The proper response to being scolded by HR for saying that is to ask what the person's username is, so you can speak to their manager.
Then, when you speak to the manager, ask them not to have their report telling people not to do things that HR doesn't have authority over (coworkers discussing health topics like that are not within the scope of HR).
Then, when you speak to the manager, ask them not to have their report telling people not to do things that HR doesn't have authority over (coworkers discussing health topics like that are not within the scope of HR).