All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
If the fact that an appropriate amount of water will not reach the fetus (due to fasting) is harmful to it, then the mother is obliged to stop fasting, especially if the doctor who has ordered her to do so is a Muslim and has a lot of experience in this regard. Insisting on fasting in such a case is really a mistake and a form of extremism given the hardship and harm that it causes while Allaah Almighty says (what means): {… and has not placed upon you in the religion any difficulty.} [Quran 22: 78]
Allaah Knows best.