A pharmacist who used to teach at the University of Bradford has been given a warning by the pharmacy regulator over "entirely inappropriate" conduct.