Yes. Sin is forgiven the instant we repent of it. For a Catholic who knows that the ordinary condition of forgiveness of a mortal sin is sacramental confession, he must intend – at least subconsciously – to go to confession as soon as is reasonably possible. If he dies after sincerely repenting his mortal sin but before he can go to confession, it is possible for him to go to heaven. Only if someone dies unrepentant of mortal sin is it not possible for him to be saved.