That’s only a problem if they committed and have not repented of a mortal sin prior to their incapacity. Since a mortal sin requires grave matter, full knowledge, and full and free consent to the action, we cannot know if that person has committed such a sin. If the afflicted person (perhaps at a mild stage in the illness) goes to confession and confesses all that he remembers, all of his sins (including any he honestly forgot) are forgiven. Indeed, so long as the person at least implicitly desires to receive the anointing of the sick and is generally disposed to receiving it, he can be forgiven of his sins by the anointing of the sick.
This sacrament [the anointing of the sick] is to be administered to the sick who, when they were in possession of their faculties, at least implicitly asked for it (canon 1006, Code of Canon Law [1983]).
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.