There are, of course, those who are struggling with invincible ignorance about our most holy religion. Sincerely observing the natural law and its precepts inscribed by God on all hearts and ready to obey God, they live honest lives and are able to attain eternal life by the efficacious virtue of divine light and grace. Because God knows, searches and clearly understands the minds, hearts, thoughts, and nature of all, his supreme kindness and clemency do not permit anyone at all who is not guilty of deliberate sin to suffer eternal punishments." Encyclical On Promotion of False Doctrines (Quanto Conficiamur Moerore) by Pope Pius IX, 1863
That is precisely why and how God draw souls to His flock, this is, the Holy Catholic Church, outside of which there is no salvation.
In the Book of Ezechiel, after revealing the promise of baptism (36:25), God tells us how His Spirit can change the heart of man and cause him to obey His commandments: “And I will give you a new heart, and put a new spirit within you: and I will take away the stony heart out of your flesh, and will give you a heart of flesh. And I will put my spirit in the midst of you: and I will cause you to walk in my commandments, and to keep my judgments, and do them” (36:26-27).
Christ says: “No man can come to me, except the Father, who hath sent me, draw him; and I will raise him up in the last day” (v. 44). If one is to come to Christ, he must be drawn by the Father’s efficacious grace; he cannot come to Christ by his own natural powers.
Do you really think that for the one who the Father draws will be impossible to receive Baptism (and the rest of the Sacraments) and thus fulfill His promise? Do you think that the worthy souls that Gods draws will be deprived of the means of Salvation?
These Sacraments needed for salvation are only dispensed by the Catholic Church, VISIBLY. Everyone outside It perishes.