Of course.
To say otherwise is to deny God's mercy. Consider the workers in the vineyard. Don't be the murmurer who disdains those who arrived at a late hour and resents God for His mercy toward the wayward sheep.
Those in the vineyard all accepted the work that was offered to them, all did the same job for the same reward for the same master.
OTOH, Prots refuse the work, they therefore get no pay or reward and have a different master - libs usually call this "invincible ignorance" - far as I know, no prot has ever been saved at the last minute via a perfect act of contrition. Anyone know of any?
I was taught we should expect to die as we have lived aka Rom. 8:13. No, I don't believe that any one who lived outside the Church and dies outside the Church will be saved, certainly not in the last minute. But I'll gladly be wrong if anyone knows of such people, please show us.
Protestant's deny that works are efficacious or that they contribute at all or co-operate within God's providence, yes; but that does not mean that they do not DO works. In this instance given by the OP, one work we are assured of is perfect contrition. And throughout a given protestant's life, it is perfectly conceivable that they have done other works. It's certainly not the case that non-Catholics or non-members as such cannot perform works, that proposition is condemned I believe.
As far as dying as one lived, that is true inasmuch as our hearts harden the more we reject God's grace, but God's grace can move even the most miserable sinner.
As I said to Ladislaus, whether conversion happens twenty years before death or twenty seconds before death, the principle of God's mercy to His elect is the same. You seem to think that there is a "cut off point" where a person can no longer be the recipient of God's mercy and grace to convert-- there is, and that is death. Not twenty seconds before death, not twenty years before death.
Yes, God can offer all the graces necessary to change one's heart, and God does that all day long already, and after a life time spent rejecting those exact same graces, what is it that makes you think that after a lifetime of making a habit of rejecting the same graces offered hour after hour, day after day and year after year, that the prot will suddenly have a change of heart and change his habit in his last moments and seek those graces and accept those graces and benefit from those graces all in his last iota of life? Not very logical thinking IMO.
If in fact he did make a perfect act of contrition, only God would know whether that contrition was acceptable to Him and satisfied for the sins of the prot's whole life, we can never, in this life ever know. At best, our answer must be that we do not know if his perfect act of contrition sufficed to save him or not.
Because we cannot know if the prot made it, we could pray for that soul in the hope of a "death bed conversion", but I can tell you that I hold out no hope of myself ever making it to heaven that way so I certainly would not hold out hope for some theoretical prot to make it. How about you - do you honestly think you could make it that way?
Prots are in the wrong vineyard entirely, and of their own free will. Whatever works they do are useless unless they first seek the truth and apply their works in the right vineyard - but they do not seek the truth. Whoever is the master of their vineyard is who they work for, but rest assured, if they die while employed in that vineyard, the reward they receive will not come from Our Lord's vineyard.