No one can be said to be teaching "heresy" until the dogma is actually defined. Before that, it's merely every man's knowledge and opinions on the matter against every other man's. If the truth is not made clear or defined, how can someone be said to be against it, since they have not known it?
Saying St. Thomas was a heretic is like saying no person who lived before Christ went anywhere but hell, because they did not accept Christ. Well, one problem. Before a specific date in history, Christ had not yet come, so there was not yet any issue of denial or no denial for which those people could be condemned.
Likewise, condemning saints for teaching something in error, before the truth was defined and the error condemned, is equally insane. If they did not know the truth, how could they be guilty of rejecting it?
And if they could NOT be guilty of rejecting what was not yet known certainly, then there is no sin, in which case their personal sanctity is not threatened by their error, even if it WAS, indeed, error. God does not condemn those who are innocent of guilt.
So we need not be threatened by the sainthood of those who unknowingly adhered to heretical positions before they were such. We have only to switch on our Catholic minds, and reject the errors now that we DO know them to be such.
Unfortunately for the lazy man, Catholicism, or indeed the truth in anything, is never something which you can find by just switching off your brain and swallowing everything blindly. None of us are God, so none of us knows everything. That being the case, until the end of time, truth will always need to be picked out from among errors. Which promises always to be confusing at times, difficult at other times, and in some cases virtually impossible in the moment given certain circuмstances. Things will never be simple, and all black and white, and easy for us to find and follow. Even the infallible pope must choose to use his infallibility, so even HE is capable of erring otherwise, so we cannot even follow HIM with total blindness. (As we learned in V2.)
Sorry, but there's no easy way in this life.