Remember, neither Saint’s writings are considered part of Scripture, and therefore inerrant. They can contain error.
Remember also that in the time of these saints, reproductive biology was not understood at the level it is today. The idea, for example, and it was always given as an idea and not dogma or doctrinal truth, of "ensoulment’ relates to the fact that in a woman’s pregnancy, she did not start to ‘show’ or the child to move and be felt (quickening) for some months beyond conception. The idea that a man’s sperm and a woman’s ova were involved was imperfectly understood. Therefore, if St Thomas or St Catherine believed that Mary was born immaculately and made sinless at quickening, to them that WAS the point that a soul came into existence, therefore it was analogous to our understanding of life beginning at conception.
Therefore, there is no heresy involved, Neither Saint was teaching or claiming something that went against dogma or doctrine as it was understood at the time. With greater scientific knowledge, they would have certainly concurred with the Church’s deepening understanding of life beginning at conception, and would have written it as such.