No one can be saved outside the church. Moreover it is a dogma of faith that no one can be saved outside the church. On the other hand, those who labor under invincible ignorance concerning Christ and his church are not to be damned to eternal punishment on account of such ignorance, since they incur no guilt for this in the eyes of the Lord, who wishes all men to be saved and to come to the knowledge of the truth, and who does not deny grace to a person who is doing what lies in his power, so that such a one can obtain justification and eternal life. But no one obtains this who dies in a culpable state of separation from the unity of the faith or the communion of the church. Anyone who is not in this ark of salvation will perish in the prevailing flood ...
See my emphasis above. Again it's a paraphrase of St. Thomas who doesn't say such as these will be saved, just they will not be punished on account of the sin of infidelity but [undoubtedly] will have not receive the grace of faith due to other sins. I'll bet too that the "so that such a one can obtain" part uses a subjunctive verb in Latin (typically found after "so that"), and the translation should really read "so that such a one might obtain".
Nevertheless, the Holy Spirit prevented this "culpable state of separation from the unity of the faith or the communion of the Church" nonsense from being defined. While this is certainly true, the opposite might be inferred, namely that anyone who dies "in an inculpable state of separation ..." CAN obtain this. So this was clearly inserted as a potential timebomb by someone to be exploited later. Yet the Holy Spirit intervened, because that would be an implied Pelagianism.
These invincible ignorants are not guilty of heresy or infidelity, only original and actual sins. This is what this says. It is important to make a clear distinction between the Hell torments for actual sins, and the mere absence of God which is the result of Original Sin. People that have a difficulty understanding God's justice is usually because they do not know about the extent of Original sin and the different levels of Hell. The invincible ignorant is not saved on account of original sin, at the very least.
St. Thomas himself explained that those who die invincibly ignorant, who have heard nothing about the Faith through no fault of their own are still damned for their sins, including original sin, which cannot be taken away without Baptism and the Faith.
The Roman Catholic Church infallibly defined at the ecumenical councils of Lyons and Florence, that the guilt of original sin, which only Baptism may remit, suffices for damnation.
“The souls of those who die in mortal sin or with original sin only, however, immediately descend to hell, to be punished moreover with disparate punishments. […] They will go into the everlasting fire prepared for the devil and his angels