I had it a few weeks ago as well. Doctor gave me metronidazole. I had a reaction to the medicine and had to stop taking it. Go back to the doctor next week to see what they want to do.
Since it is bacterial you need antibiotics which only the doctor can prescribe. Also they need to test you to figure out which species of bacteria since there are a few. This is because each antibiotic targets specific bacteria's and not all of them can apply to your case and or a pregnant lady
I was diagnosed with BV last week and my doctor prescribed me metronidazole. 500mg 2xs a day for a week.
Ive had it but not while pregnant.. my dr just prescribed me medication to take.. it might be a different kind since youre pregnant but im sure whatever he gives or gave you is safe.