Hello. I am a solicitor with over 15 years experience. i will try to help you with this.
Harassment in law means you engage in a course of conduct (ie more than one thing open time) which is likely to cause harassment (that is alarm or distress) to another person. If this is the only incident then what you have said is not harassment in law. Simply pointing out a defect in personal hygiene is not harassment. No doubt you were, in fact, trying to help him.