This may not be an ex cathedra statement of the Pope, but to think that the learned men who came to this conclusion happened to miss a supposedly wretched heresy is extremely rash, and offensive to pious ears.
"An Exposition and Defence of All the Points of Faith Discussed and Defined By the Sacred Council of Trent". By St. Alphonsus Liguori, p.128-129. This is from google books.
Here we have again, that sound philosophy I was referring to above.
Thus we may rightly conclude that when the Church has defined we need the sacrament of baptism to be saved, the desire for it is included not only because the Prince of Theologians (St. Thomas Aquinas) and the father of moral theology (St. Alphonsus Liguori) taught it, knowing the Catholic Faith very well, but also from the standpoint that the good Lord regards the will for the deed, both for sin, and virtue.
CONTEXT. We must read everything in the light of sound philosophy.
And no, I reject the concept that one may be saved by invincible ignorance of the Catholic Faith.
The infallible teaching of the Church make BoD and BoN impossible. Regurgitating fallible opinions from Saints does not change this and shows a lack of obedience to Catholic authority.
It is not rash especially when you consider Vatican 2. The core of which is the denial of EENS which stems from exceptions like BoB and BoD. It leads to contradiction, that's why we have sedes who correctly deny V2 yet claim assertion to the same docuмent V2 cites (suprema fake).
It is certainly possible for God to allow His saints and theologian to have this error slip past them for these latter times.
Also Vatican 1 states we are to believe what the church teaches according to how it is written and not anyone's interpretation. So if even Saint xyz have an excellent interpretation of Trent, we are to put the church's own words above them.