It would entirely depend on my relationship to the person involved whether I would mention something so personal or not.
One one occasion, I taught a class of eleven year olds, one of the girls was ahead of the others in her physical development, as is quite usual amongst this age group, and she suddenly started to smell very strongly of under arm sweat.
I knew that this poor child had parents who took practically no interest in their two daughters, so I was very sure nothing would be done to address the problem in the girl's home.
I tackled the matter by speaking to this girl's elder sister, whom I also taught and simply said, I had noticed it was time her younger sister started using a deoderant, and that her classmates were beginning not to say anything, but perhaps even more hurtfully just move away from her. We agreed big sister and I, that the little sister did not need to know I had mentioned the matter.
The problem was solved the following day.
It is harder to tell an adult that they smell than a pubescent girl or boy that the time has come for grown-up toiletries, admittedly, but a discreet word in private can sometimes be necessary.