After mass the priest allowed anyone who wanted to receive the sacrament of Anointing of the Sick to come forward and be anointed. My friend told me that one could receive the sacrament for the intention of someone else. I didn’t go forward. Was it licit for the priest to do this? Would it even be valid for someone that’s not in danger of dying?
No, it is not valid to receive the sacrament “on behalf” of another. A person must be physically present and actually receive the sacrament to receive the grace a sacrament.
Anointing of the sick is only for those who are in some danger of death due to illness, old age, or undergoing surgery. Simply being a bit “under the weather” is not enough.
Catechism of the Catholic Church:
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.”
1515 If a sick person who received this anointing recovers his health, he can in the case of another grave illness receive this sacrament again. If during the same illness the person’s condition becomes more serious, the sacrament may be repeated. It is fitting to receive the Anointing of the Sick just prior to a serious operation. the same holds for the elderly whose frailty becomes more pronounced.