Roman Catechism 16.47

Chapter 16 — Part II: The Sacraments — Baptism

Section 47. 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 office extends 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.