Having said all this, we must recognize that this doctrine is not as far reaching as some imagine it to be. People will sometimes ask, "Does this mean non-Catholics are going to hell?" Not necessarily.
The Church recognizes that God does not condemn those who are innocently ignorant of the truth about his offer of salvation. Regarding the doctrine in question, the Catechism of the Catholic Church (quoting Vatican II document Lumen Gentium, 16) states:
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 conscience—those too may achieve eternal salvation. (CCC 847)
Vatican II document Gaudium Et Spesteaches similarly on the possibility of salvation:
All this holds true not only for Christians, but for all men of good will in whose hearts grace works in an unseen way. For, since Christ died for all men, and since the ultimate vocation of man is in fact one, and divine, we ought to believe that the Holy Spirit in a manner known only to God offers to every man the possibility of being associated with this paschal mystery. (22)
This teaching is consistent with Jesus’ own teaching about those who innocently reject him: "If I had not come and spoken to them, they would not have sin" (Jn 15:22).
But once a person comes to know the truth, he must embrace it or he will be culpable of rejecting it. We see this in Jesus’ words to the Pharisees: "If you were blind, you would have no guilt; but now that you say, ‘We see,’ your guilt remains" (Jn 9:41).