Anyone can perform a baptism, however this is typically in extreme cases. The Catholic Church has ordinary ministers for sacraments and those are bishops, priests, and sometimes deacons. Most baptisms are done by a priest when the person is an infant, but there are extreme cases when even an unbaptized person can baptize someone. All that is required is “the will to do what the Church does when she baptizes, and to apply the Trinitarian Baptismal formula.” If this is done it is usaully because someone is lying on his/her deathbed and they truly desire to become Christian. How is this type of Baptism valid you ask? Well, the Church believes in the universal saving will of God and the necessity of Baptism for salvation (1 Timothy 2:4, John 3:5).
A Guide to Catholic Baptism - About Catholics