The Church is sometimes called the universal sacrament of salvation. That use of the word sacrament is broad, not strict. It is true in as much as the Church is the divinely instituted means of giving grace to all. But the Church is not a visible rite - it rather confers these visible rites which we call the seven Sacraments.
From the fact that the Church is God's means of giving grace, is it is clear that there is no salvation outside the Catholic Church. This truth has even been defined by the Church more than once, e.g., in the Council of Florence in 1442. However we must take care to understand this teaching the way the Church understands it. We just saw that the Church claims the exclusive authority to interpret both Scripture and Tradition. So one like Leonard Feeney who interprets the teaching on the necessity of the Church his own way is not acting like a Catholic theologian at all. The Holy Office, on August 8, 1949, declared that L. Feeney was guilty of this error. Because of his error, he rejected several teachings of the Magisterium, saying they clashed with this definition - but they clash only with his false interpretation, given in private judgment.
Pius IX (Quanto conficiamur moerore, August 10, 1863) taught: "God... in His supreme goodness and clemency, by no means allows anyone to be punished with eternal punishments who does not have the guilt of voluntary fault." Vatican II (Lumen gentium # 16) taught the same: "They who without their own fault do not know of the Gospel of Christ and His Church, but yet seek God with sincere heart, and try, under the influence of grace, to carry out His will in practice, known to them through the dictate of conscience, can attain eternal salvation." Pius XII had said (Mystici Corporis Christi) that one can "be related to the Church by a certain desire and wish of which he is not aware", i.e., by the desire to do what God wills in general.
Precisely how does this work out? We saw on our very first page that St. Paul insists (Romans 3:29) that God makes provision in some way for all. We saw that one of the earliest Fathers, St. Justin Martyr (Apology 1:46) said that some, like Socrates could even be Christians because they followed the divine Word. Now St. Justin also said that the Divine Word is in the hearts of all. Then we notice in St. Paul's Romans 2:14-16 that "The gentiles who do not have the law [revealed religion] do by nature the things of the law; they show the work of the law written on their hearts." And according to their response, they will or will not be saved.
Clearly, it is this Divine Word, or the Spirit of Christ, the Divine Word, that writes the law on their hearts, i.e., makes known to them what they should do. If they follow that, although they do not know that that is what they are following, yet objectively, they do follow the Logos, the divine Word. And so St. Justin was right in calling them Christians. We can add that St. Paul in Romans 8:9 makes clear that if one has and follows the Spirit of Christ, he "belongs to Christ." But, to belong to Christ is the same as being a member of Christ, and that is the same as being a member of the Church. Not indeed by formal adherence, but yet substantially, enough to satisfy the requirement of substantial membership. Indeed, Vatican II even wrote (LG # 49): "All who belong to Christ, having His Spirit, coalesce into one Church."
So, St. Paul was right: God does take care of them; St. Justin was right too: they can be Christians without knowing it. Otherwise, God would be sending millions upon millions to hell without giving them any chance at all, if they lived far from places where the Church was known, e.g., in the western hemisphere before 1492.
That fact that salvation is possible in this way does not mean that there should be no missions or attempts to bring back the Protestants. Richer and more secure means of salvation are to be had with formal explicit adherence to the Catholic Church. Therefore we need to make every effort. In regard to Ecumenism, it is good to keep in mind a rule from Vatican II, in its Decree on Ecumenism (# 11): "It is altogether necessary that the complete doctrine be clearly presented. Nothing is so foreign to true Ecumenism as that false peace-making in which the purity of Catholic doctrine suffers loss, and its true and certain sense is obscured."
Basic Catholic Catechism
PART FIVE: The Apostles' Creed IX - XII
Ninth Article: "The Holy Catholic Church; the Communion of Saints"
By William G. Most. (c) Copyright 1990 by William G. Most.