It is a historical teaching of the Church that there is no salvation outside of the Church. For this reason, there are some who mistakenly believe that this means that salvation can only be granted to those in the institutional Catholic Church. The core of this problem is that the doctrine is approached soteriologically rather than ecclesiologically. This doctrine is not addressing how people achieve salvation. This doctrine is ultimately about the nature of the Church. In other words, this doctrine is not making the claim that we are saved by the Church, but rather that those that are saved are in the Church by default. Thus, it becomes imperative that we a full understanding on what and who the Church is.
The Second Vatican Council developed the understanding on this very thing.. Does the Church, the Mystical Body of Christ, include more than practicing Catholics? According to the Second Vatican Council, to which assent of the will must be given, the answer is "yes." According to Lumen Gentium, the Dogmatic Constitution of the Church, the Church is necessary for salvation. Bur we also know form Unitatis Redintegratio that all those validly baptized, that is according to the Trinitarian Formula, and with the intention of bringing someone into the Church of Jesus Christ, is truly in the Mystical Body of Christ, though if not Catholic, this union with Christ is lacking in some way. Of course one could take this to an extreme, and claim indifferentism, the idea that all churches are the same, and the means of salvation are to be found equally in all. This is also not true. The Council clearly teaches that the "fullness of faith subsists in th Catholic Church alone," which seems to indicate that the Catholic Church holds primacy. It is of my own personal opinion, that if one knows that the Catholic Church is the One Church founded by Jesus Christ, and still rejects the Church, then their soul is in peril. If one is seeking the truth, and has not yet come to that knowledge, then we must trust on the mercy of God. I realize that this post is fairly inadequate in treating this complex subject, but I would implore you to carefully read the Church's documents, and you will see that the normative path to salvation is through the Catholic Church, but that does not mean that one must be a registered Catholic to attain salvation.