Yeast infection while pregnant

Sorry for being clueless, but women can still get yeast infections while pregnant right ? I’d normally take diflucan for it. Is it still safe during pregnancy? Or am I feeling something related to pregnancy and not an infection at all

SOO

I’m reading online that taking diflucan while pregnant can be linked to miscarriage and birth defects ?