Wow, it's fascinating how he implies heretics can be part of Christ's mystical body.
See, I don't think he does that ... but is just asking whether it's permissible to assist at the Mass of a heretic priest. He undoubteldy knew the unanimous Patristic teaching that they're not members of the Church, but considered it a different question wheter to receive the Sacraments from them. St. Pius X, for instance, permitted Catholics in Orthodox territories to receive the Sacraments from the Orthodox provided there was no other option and no danger of sin or scandal. That stands to reason. Even with heretics, it's the Church that has authority over the Sacraments and the Church can even command the heretics to provide the Sacraments to the faithful ... whether or not they'd obey being a different matter altogether.
What this does do, however, is undermines a bit the dogmatic anti-una-cuм position where receiving Communion from a heretic would render someone a heretic by association, or contagion by communion.
in any case, St. Thomas was very unclear in blending heresy, schism ... with other sin such as fornication. He does admit at one point that there's a difference, but he still attributes that difference to ecclesiastical law, where the Church has forbidden heretics from confecting the Sacraments, and putting these on the same level leaves the question confused and unresolved. This just goes to show you that St. Thomas was human too ... and may have been having a bad day, not feeling well, tired, experiencing brain fog, etc.