I found this from Jimmy Akin:
Q: In another question you said that St. Thomas Aquinas explained why Mary submitted to a Mosaic purification ritual even though she was sinless, something which you said he and virtually everyone in his day accepted. But I have heard a Protestant apologist repeatedly say that Aquinas rejected the Immaculate Conception. What's the deal?
What the Protestant apologist said is a classic example of a half-truth. Evangelicals often use the fact that Aquinas (unlike others of his age) did not believe that Mary was entirely sanctified from the moment of her conception to imply that she committed actual, personal sin--as Protestants assert. However, nothing could be further from the truth. Even though Aquinas did not claim that Mary was sanctified from the moment of her conception
, he did claim that she was sanctified before her birth
, and so never committed personal sin (for unborn children commit no personal sin; cf. Rom. 9:11).
There is more here: