It is best that an ordained minister baptized because he or she has a special calling to do the Ministry of Word and Sacrament and because he or she has been specifically trained to serve in the capacity.
However, there are times when an ordained minister is not available and there arises a situation when baptism is desired and must be done quickly. Anyone can baptize, even a non-Christian, insofar as the Baptismal Rite is done with water, in Trinitarian formula and theology, and with the intent to give an actual baptism (in other words, it wasn't done in practice or play).
In these Emergency Baptism situations, find out the persons name, make sure they truly intend to be baptized, have never been baptized before, and then say and do "N, I baptize you in the Name of the Father (pour water on the head), and of the Son (pour water on the head), and of the Holy Spirit (pour water on the head)." Do not attempt to solicit any sort of confession or affirmation of any kind (that's outside your prevue), and if there is someone who is ordained around (or at least someone who can serve in some official capacity, like a licensed and instituted Reader or Acolyte, or a Subdeacon), do not attempt to baptize unless directed to do so by the cleric.
And never baptize anyone who does not desire or has been baptized before. God works the grace in all baptisms; all the cleric or layperson does is perform the outward and visible rite (a real symbol, if one will). It has always been on record that "rebaptizing" is a serious offense.
A person who survives the encounter is not rebaptized. Instead, the individual should be brought to church at the most earliest convenient time to then be welcomed and be anointed with Chrism in churches or denominations with that ancient rite, as well as given charge officially to take roll in the Church, confess, affirm faith, and so on and so forth. The layperson who did the baptism should be present at the same time and can act as a witness.