The Minchas Chinuch (263:3) asks the following question: How can Rabbi Akiva in Chulin (72a) rule that a fetus inside of its mother’s womb can Biblically contract tumah? Shouldn’t the fetus be regarded as a “swallowed item,” and therefore, be shielded by the mother’s body from becoming tamei?
He answers that the fetus is considered like a thigh of its mother and therefore is rendered tamei just like any other one of the mother’s limbs.
The Magen Avraham (O”C 343:2) cites the Rokeach as saying the following: Concerning a pregnant wife of a Kohen, she is permitted to enter into a room that contains a corpse (even though the baby might be a male and cannot become tamei). The rationale is based upon a “double doubt.” Perhaps she will miscarry, and even if she will not, perhaps the child will be a female, not a male!
The Magen Avraham asks: Why is this logic necessary? It should be permitted because the fetus can be regarded as a “swallowed item,” and hence, cannot become tamei?
Reb Elchonon Wasserman in Koveitz Shiurim (2:41) answers: A Kohen is forbidden from entering into a room that contains tumah (regardless of becoming tamei). A “swallowed item,” although it does not become tamei, it is nevertheless, considered as if it is inside the room. Therefore, the principle of a “swallowed item” will not permit her to enter the room.
According to the Minchas Chinuch, we can answer that the fetus is not regarded as a “swallowed item,” and therefore will not be a reason to permit her to enter.