The Catholic Church has always taught that outside the Church, there is no salvation.
In practical terms, that means that people who have never heard the Gospel may, by the proper application of natural law, come to believe in God and seek a means of salvation. It is possible some of these people may be redeemed.
For Christians who are not, and never have been, in communion with the Catholic Church, e.g. Protestants, it is possible that they too may be saved. However, as they lack most of the Sacraments, the miss the fullness of truth.
For those who leave the Catholic Church for another Christian denomination, presuming that they are not rejecting some Catholic teaching but do so out of ignorance about what the Church teaches, they too may be saved (redeemed).
Those who leave the Catholic Church for another religion (e.g. LDS), for whatever reason, place their soul in serious peril. It is a grave sin to separate oneself from the Church.
Any person who knowingly rejects or refuses to learn about Catholic teachings place their immortal soul in jeopardy.