Water baptism is the only true baptism and it's necessary for salvation, which is why God even grants (baptized) atheists the ability to validly water baptize a willing person in times of imminent danger to that person's life.
In case of necessity, God permits even unbaptized atheists to baptize.
From Trent's Catechism:Ministers In Case Of Necessity
Those who may administer Baptism in case of necessity, but without its solemn ceremonies, hold the last place;
and in this class are included all, even the laity, men and women, to whatever sect they may belong. This officeextends in case of necessity, even to Jews, infidels and heretics,
provided, however, they intend to do what the
Catholic Church does in that act of her ministry. These things were established by many decrees of the ancient
Fathers and Councils; and the holy Council of Trent denounces anathema against those who dare to say, that
Baptism, even when administered by heretics, in the name of the Father, and of the Son, and of the Holy Ghost,
with the intention of doing what the Church does, is not true Baptism.
And here indeed let us admire the supreme goodness and wisdom of our Lord. Seeing the necessity of this
Sacrament for all, He not only instituted water, than which nothing can be more common, as its matter, but alsoplaced its administration within the power of all.
In its administration, however, as we have already observed,
all are not allowed to use the solemn ceremonies; not that rites and ceremonies are of higher dignity, but
because they are less necessary than the Sacrament.