The priest administers the sacrament of the Anointing of the Sick when requested. See this link (
catholic.com/tracts/anointing-of-the-sick) for a lot of helpful information and background.
“Last Rites” are given to a living person, and never to a dead person.
From the Catechism, #1514: “The Anointing of the Sick ‘is not a sacrament for those only who are at the point of death. Hence, as soon as anyone of the faithful begins to be in danger of death from sickness or old age, the fitting time for him to receive this sacrament has certainly already arrived.’”
So, I would say that a priest would
not perform the anointing if the person was neither suffering from serious sickness or the effects of old age. Pastorally, though, if a person requests the sacrament, it is generally reasonable to administer it. (However, if the desire to receive the sacrament was based in – for example – hypochondria, I would wonder whether it was more pastorally sensitive to administer it or not…)