The tradition of the Church has long held that while the ordinary minister of baptism is clergy, in an emergency anyone may baptize.
This right of any person whatsoever to baptize in case of necessity is in accord with the constant tradition and practice of the Church. Tertullian (De Bapt., vii) says, speaking of laymen who have an opportunity to administer baptism: “He will be guilty of the loss of a soul, if he neglects to confer what he freely can.” St. Jerome (Adv. Lucif., ix): “In case of necessity, we know that it is also allowable for a layman [to baptize]; for as a person receives, so may he give.” The Fourth Council of the Lateran (cap. Firmiter) decrees: “The Sacrament of Baptism … no matter by whom conferred is available to salvation.”
The constant teaching of the Church has been that because baptism so essential to salvation it is the will of Christ that it be readily available for the salvation of all.
It is due to the mercy of Him “Who will have all men to be saved” (1 Timothy 2:4) that in those things which are necessary for salvation, man can easily find the remedy. Now the most necessary among all the sacraments is Baptism, which is man’s regeneration unto spiritual life: since for children there is no substitute, while adults cannot otherwise than by Baptism receive a full remission both of guilt and of its punishment. Consequently, lest man should have to go without so necessary a remedy, it was ordained, both that the matter of Baptism should be something common that is easily obtainable by all, i.e. water; and that the minister of Baptism should be anyone, even not in orders, lest from lack of being baptized, man should suffer loss of his salvation.
Anointing of the Sick/Last Rites are not per se essential to salvation. Perfect contrition or being in an absolute state of grace permits someone to enter into heaven. The essence of the sacrament is spiritual healing and remission of the temporal punishments for sin. That only a priest may administer the anointing of the sick comes to us not only from the tradition of the Church but from Scripture itself:
Is any man sick among you? Let him bring in the priests of the church, and let them pray over him, anointing him with oil in the name of the Lord.
There is also the matter of the theology of each sacrament. While the sacrament of baptism itself forgives sins, it forgives sins through the waters of regeneration and not the authority of the minister. We can see this in the language we use. When baptized we do not say that the priest, deacon, or layperson forgave the sins of the baptized. We say that their sins were forgiven through the sacrament of baptism.
Post baptism, we say that the priest forgives sins through confession. We do not say that any lay person can forgive the sins of another person on behalf of Christ, that is reserved to priests through the authority given to them by Christ Himself (John 20:23).
Anointing of the sick/Last Rites requires the minister to forgive sin/remit punishment, only one who has authority to do so may do that. And the laity cannot forgive on behalf of Christ.