Yes, you can ovulate during menstruation.
If your cycles are irregular then it could have been a mid-cycle bleed like ebn_d said, or AF with O straight after?