Even the Catholic Church teaches that you don’t have to be Catholic to be saved.
This affirmation is not aimed at those who, through no fault of their own, do not know Christ and his Church: Those who, through no fault of their own, do not know the Gospel of Christ or his Church, but who nevertheless seek God with a sincere heart, and, moved by grace, try in their actions to do his will as they know it through the dictates of their consciencethose too may achieve eternal salvation. (CCC 8