Megan Breen initially denied the fling with the unnamed prisoner while working at two prisons in Wales