According to every denomination, anyone can do it in times of necessity. You need water, consent, and a Trinitarian statement with a name: "N, I baptize you in the name of the Father, the Son and the Holy Spirit." Optional: "N, you are sealed by the Holy Spirit in baptism, and marked as Christ's own forever." Goosebumps.
Read more about the theology of lay baptism here-
A thorough statement on the sacrament of Christian baptism here...
And see a really impressive treatment of the theology of sacramental baptism at Wittenburg Trail.