It's pretty much Church teaching, implied in the Dogma of the Immaculate Conception.
Pius IX declared that Our Lady was free from Original Sin from the moment of her conception. Without ensoulement she would not even quality as a human being and therefore could not contract Original Sin (being an inhuman mass of tissue), so the definition would be partly superfluous.
In addition, Pius IX removed the distinction between "animated" and "unanimated" foetus from Canon Law and punished all abortion from conception with excommunication
Between these two, that pretty much put to bed the scholastic error regarding this matter.