Is it muttar to set aside the rules of shabbos to save a fetus? If so, how is it possible to reconcile that with the permissibility of killing a fetus (abortion)?
The Gemara says that if a pregnant woman is desperately craving food, she can eat it even on Yom Kippur if needed. The Rishonim there discuss that this is firstly out of concern for her own safety; furthermore, if not having this food may harm the fetus, it's a lot riskier to the mother to deliver a stillborn than it is a live baby. But beyond that, the Rishonim imply that saving the "proto-life" of the fetus is still enough to violate Yom Kippur (and hence shabbos). Certainly if the fetus is at 40 or more days post-conception, and possibly even earlier.
Even if we view the fetus as not "fully alive yet", we have the concept of "violate one shabbos to save a life, so that more shabboses will be kept"; thus, we have a potential life here, which is enough to warrant breaking shabbos or yom kippur.