Baptism by water is, since the promulgation of the Gospel necessary for all men, without exception, for salvation.
This is DE FIDE teaching stated in the Council of Trent.
The Cathechism of Trent gives the exact time water Baptism became obligatory on all men for salvation, with no exceptions. It states that: "from the time of Our Lord's Ascension into Heaven, it was then obligatory by law to be baptised for all those who were to be saved".
Trent Canon 2 on Baptism (see my signature) actually anathemized those who say that water is to be understood methaphorically or find any "substitute" for water or turn real and true "water" into a "figure of speech".
Also, those unbaptized persons in false religions, not being members of the Church, are definitely not subject to the Roman Pontiff but it is a defined dogma of the Catholic Church that no one can be saved who is not subject to the Roman Pontiff.
It is one of the requirements for salvation:
"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."
(Pope Boniface VIII, in the bull, Unam Sanctam, 1302).