To my knowledge, the Church hasn’t made a statement on baptism of the unborn or preborn. Since the Church states that a person is human and endowed with a soul at conception, making abortion a moral evil, why do we not baptize the unborn?
Code of Canon Law (CIC) states, “Every person not yet baptized and only such a person is capable of baptism” (CIC 864). Therefore, a non-baptized person who is not yet born is theoretically capable of baptism.
The problem with such a baptism is how to do it. Is there a safe way? While the current (1983) Code of Canon Law does not prohibit the baptism of children in the womb, the 1917 Code stated, “No one should be baptized in the mother’s womb so long as there is a hope that he can be baptized correctly outside of it” (1917 CIC 746.1).
Suggested reading: Whether a child can be baptized while yet in its mother’s womb?