A teacher has been given a ban after admitting that she was in a relationship with a sex offender.