If someone honestly believes a heretical or schismatic or pagan idea, and honestly does not know any better, then God would not hold that against a person.
But traditionally, from OT times, that has been supposed to be a pretty high bar. By natural reason and the Holy Spirit’s presence in the world, almost everyone is supposed to have some notion that there is one God Who made us, and that we should try to worship Him.
In early Christian times, there were some Gnostics and other members of heretical sects who managed to die from Roman persecution, along with the martyrs. If they persevered, their presence was recorded. (Usually they just sacrificed to the Emperor and bopped out of there, because it wasn’t against their religion/s.)
And then there were the guys who tried to force other Christians to “martyr” them, by making bandit attacks – because martyrdom didn’t happen much when Christianity was legal. They were the only people who thought they were going to Heaven. (Notice that they did not go evangelize in pagan areas. Too much trouble.)