On the one hand, a priest may not give the Last Rites to one who has left the Church and remains unrepentant. However, if the priest has any founded hope (even the slightest) that the person wants the Last Rites, along with some reason to believe that the person is repentant (even if that might not be expressed in words or gestures at the moment), then the priest may administer the Last Rites.
The point is that what someone should do in a situation like this is to contact the local priest, explain the situation to him, and give him the opportunity to make the Rites available. Only the priest who is actually present and able to assess the situation for himself can make that determination.
Calling the priest (and doing so as soon as possible) is certainly the right thing to do.