I think you’re getting at what the catechism used to call (maybe still does) “Baptism of Desire” and the “natural law”. The natural law, which the 10 Commandments reflect, is inherent in human beings, human nature is basically good (Catholic viewpoint, not Calvinist), not evil, and someone who has never been introduced to Christ or baptized may still say “yes” to God in the limited capacity possible to him by adhering to the natural law and following a true desire to know truth and goodness. There’s a joke that “ignorance is the 8th sacrament”...in other words, we don’t know, but God may forgive an awful lot because someone just did not know any better. But a person, Christian or not, will be accountable for saying “no” to God, that is following malicious or evil tendencies, regardless of Baptism.
Well, I’m not a theologian, hope I explained OK, if not someone is sure to correct me.
Thanks for that!