"a pupil can bug their teacher" is grammatically wrong because "a pupil" is a singular subject in the same sentence as "their" which is a plural predicate nominative.