A rule preventing patients of different sexes from being treated on the same ward was broken hundreds of times at Cambridge University Hospitals Trust last year, new figures show.