B’sha’ah tovah!
A normal, healthy pregnant women is required to fast on Tisha B’Av. When there is danger to the mother or the fetus, a woman consults with both her rabbi and doctor, and a decision is made whether she is permitted to start the fast or whether she should not fast at all.
This year Tisha B’Av is postponed (the fast is on the 10th of Av because the 9th is Shabbat), so there is greater room for leniency not to fast in borderline situations.
Given your medical history, there is concern about whether the fast would put you or your baby in danger. If your doctors and midwives tell you not to fast, then you should not fast. Furthermore, because of the greater leniency this year, there are differences of opinion as to whether any pregnant woman should even try to fast. Therefore, it makes sense that your rabbi said that if you are at all nervous about fasting, you need not fast.
Only if you have permission from your healthcare providers, and feel good, may you try starting the fast. In that event, make sure to drink a lot of water for a few days before the fast, and to lie down in a cool room during the fast. If you feel at all unwell or dehydrated or start having contractions, you should recite havdalah and break your fast.
It is important to remember that while fasting does give you zechuyot (merits), eating to keep you and your baby safe also gives you zechuyot.
This answer applies specifically to Tisha B’av; a separate question should be asked prior to Yom Kippur.
Please feel free to get back to us with any further questions.
We wish you a smooth and healthy pregnancy!
B’hatzlacha!