Nystatin is safe for pregnant women. It’s safe if you are trying for a baby too, as it does not affect fertility. But still, do disclose that you are pregnant to your doctor.
Even though it’s safe while you are breastfeeding, make sure your baby doesn't ingest the medicine while clamping.