Catholics are only permitted to pray for those who die as Catholics
Catholics are only permitted to pray for those who die as Catholics and free from obvious grave sin.
St. Augustine, Sermon 172, 5th century: “There can be no doubt at all that these things [i.e. prayers] are of value to the departed; but to such of them as lived in such a way before they died, as would enable them to profit from these things after death. For those, you see, who have departed from their bodies without the faith that works through love (Gal 5:6) and its sacraments, acts of piety of this sort are performed in vain.”
Pope Gregory XVI, Officium, Feb. 16, 1842:
“But this is the report given to us concerning the Catholic rites used in her [Queen Caroline’s] funeral; and we have before our eyes your letter, which, on the 19th day of November, you had given your parish priests regarding this matter. But hardly are we able to express in words what kind of mental anguish we experienced when we learned from the reading of the same [letter] that you had commanded that those public …More
Outside the Catholic Church there is no salvation ( CCC 846, Ad Gentes 7 etc). We do not pray for the saints in Heaven and neither for non Catholics. We pray for the souls in Purgatory and for people on earth.
Christian faith requires us to be against those who reject Christ’s true religion, while praying and working for their conversion.