It wasn’t actually alive, though.
The trapped fetus can survive as a parasite even past birth by forming an umbilical cordlike structure that leaches its twin's blood supply until it grows so large that it starts to harm the host, at which point doctors usually intervene.