Ranitidine?!? Help

Chloe • 👶🏼 👶🏼💙🌈 22🦄

Hi so I was prescribed ranitidine by the doctor knowing I’m pregnant, but when I go to get them from the pharmacy the lady said I cannot take them. Am I able to or not as the doctor gave me then??