He was a geocentrist who remarked that the model might be replaced in future. He never even mentioned the flat earth.
He did mention the fact that the earth is a sphere in passing. There is a flat earth site which purports to debunk this by claiming that his comments on spherical earth are a quote from Aristotle.
However, if one checks the relevant passage in Aristotle, one an see that St. Thomas is alluding to it but not quoting it. Also, in Latin, there is no ambiguity on whether St. Thomas agrees with what he is writing about spherical earth. In Latin, when quoting or alluding to the beliefs of others which one thinks are untrue, one uses the subjunctive mood of the verb. The St. Thomas passage referring to spherical earth, however, has the verbs in indicative, which means he thinks the statements are true.