Yeast infection

I’m pretty sure I have a yeast infection it’s Very itchy and it burns when I pee and I just treated 2 bacteria’s I had I’m also pregnant and read i can take over the counter medication and I’ll be alright is this true?