I've yet to see any magisterial statement condemning belief in Baptism of Desire as heretical. It's not like theologians haven't taught it for centuries, before Vatican II, without censure.
If it were an erroneous interpretation of the teaching on Baptism, there would have been a clear condemnation of it, explicitly. The Church had ample opportunity to muster up a condemnation before Vatican II happened.
It does not get any more clear than this:
Infallible Magisterium:
A. Council of Lateran IV, The Catholic Faith:
The sacrament of Baptism, which at the invocation of God and the undivided Trinity, namely the Father the Son and The Holy Ghost, is solemnized in water, rightly conferred to anyone in the form of the Church is useful unto salvation.
B. Council of Florence, Exaltate Domino (1439):
Holy Baptism...holds the first place among the sacraments....the matter of this sacrament is real and natural water, it makes no difference warm or cold.
C. Pope Innocent III, Non ut Apponeres (1206):
In Baptism, two things are always and necessarily required, namely the words and the element (water)...You ought not to doubt that they do not have true Baptism in which one of them is missing.
D. Council of Trent, Canons of Baptism (Canon 2)
If anyone says that true and natural water is not necessary for baptism and thus twists into some metaphor the words of our Lord Jesus Christ" Unless a man be born again of water and the Holy Spirit" (Jn 3:5) let him be anathema. The Church has consistently and infallibly taught that Baptism of water is necessary to obtain life everlasting. Also accepting Baptism of Desire as a substitute for the real Baptism opens up the possibility of salvation for members of false religions. On this, the Church has infallibly declared:
Infallible Magisterium:
* Pope Eugene IV, in the Bull Cantate Domino, 1441, proclaimed ex cathedra:
"The Most Holy Roman Church firmly believes, professes and preaches that none of those existing outside the Catholic Church, not only pagans, also Jєωs, heretics, and schismatics can ever be partakers of eternal life, but that they are to go into the eternal fire 'which was prepared for the devil and his angels' (Mt. 25:41) unless before death they are joined with Her... No one, let his almsgiving be as great as it may, no one, even if he pour out his blood for the Name of Christ can be saved unless they abide within the bosom and unity of the Catholic Church."
* Pope Innocent III, ex cathedra, (Fourth Lateran Council, 1215):
"There is one universal Church of the faithful, outside of which no one at all can be saved".
* Pope Boniface VIII, (Unam Sanctam, 1302):
"We declare, say , define, and pronounce that it is absolutely necessary for the salvation of every human creature to be subject to the Roman Pontiff. This means, and has always meant, that salvation and unity exist only within the Catholic Church, and that members of heretical groups cannot be considered as "part" of the Church of Christ. It is clear as water why the so called Baptism of Desire cannot ever become dogma since it would be contradicting Infallible teaching.
Even more, those who believe that someone with only the "desire" for Baptism can be saved presume two things that the Church has solemnly condemned:
1. That the Sacrament of Baptism, commanded by God and instituted by Christ Lord, is impossible for some to receive.
2. That the Sacrament of Baptism could be optional for some (those who die with the desire for Baptism).
Infallible MagisteriumCouncil of Trent, On Justification, Ch 11:
God does not command impossibilities but by commanding you admonish you to do what you can do, to pray for what you cannot do, and He assists you that you may be able. For God does not forsake those who have been justified by His Grace unless He first be forsaken by them.
And
If anyone says that the commandments of God are, even for a man who us justified, impossible to obtain let it be anathema.
Council of Trent, Canons of Baptism, Canon 5:
If anyone says that Baptism of optional, that is not necessary for salvation, let it be anathema. Even the Holy Mother Church Herself has no power to contradict or change in any way what Our Lord Christ said and taught when He came to earth. No bishop, no council, no pope, no saint, NO ONE, can change the essential matter or form of a Sacrament instituted by Our Lord. It is part of the
Deposit of Faith.
In several occasions the Magisterium of Holy Mother Church has positively declared that no one has the power to innovate anything whatsoever regarding the substance of the Sacraments (substance meaning matter (in this case, natural WATER, and form (words, as expressed in John 3:5).
Infallible MagisteriumPope ST Pius X: "It is well known that the Church there belongs no right whatsoever to innovate anything touching the substance of the Sacraments". Thus even the Church Herself has no power or authority to alter the words or matter in the form of the Sacrament of Baptism.
Pope Pius XII: " As the Council of Trent teaches the seven sacraments of the New Law have all been instituted by Jesus Christ, Our Lord, and the Church has no power over the "substance of the sacraments ".