I heard that a bishop allowed a nun to marry a couple. Does the bishop have the authority to do this?

The Code of Canon Law makes provision when certain conditions exist for lay persons, including nuns, to assist at weddings:

Where there is a lack of priests and deacons, the diocesan bishop can delegate lay persons to assist at marriages, with the previous favorable vote of the conference of bishops and after he has obtained the permission of the Holy See. (CIC 1112)