Denying passengers due to body odour is in the category of things that happen, but happen rarely enough to sometimes be considered newsworthy.
Here's a fairly straightforward example from 2010:
Smelly Passenger Kicked Off Plane
Man's body odor on an Air Canada Jazz flight overwhelmed his fellow passengers.
...The Air Canada Jazz flight from Charlottetown, on Prince Edward
Island, was preparing for the two-hour flight to Montreal when
passengers on the plane reportedly complained about the odor coming
from one of their fellow travelers. The crew eventually decided to ask
the man to leave the plane...
...[airline spokesperson] confirmed that a passenger was removed from the Feb. 6 afternoon flight but would not say exactly why the passenger was asked to leave, saying the airline "must respect the privacy of our passengers.
It seems to be a subjective judgement call to be made by the crew, which of course leaves it open to abuse or accusations of abuse, for example (2020):
Family kicked off flight over alleged body odor sues American Airlines
A Michigan couple kicked off an American Airlines flight last
year because of their alleged body odor filed a federal lawsuit
against the carrier claiming they were victims of religious and racial
discrimination...
..."Mr. Adler asked the agent if the body odor was emanating from him,
his wife or child and the agent would not respond to the question but
continued to state that the Adlers must leave the plane at the
instruction of the pilot and because they had extremely offensive body
odor," the suit says.
The Adlers told airline staff they had bathed early that day, prior to
their morning flight.
"In response, defendant's agent made disparaging and derogatory
statement telling the Adlers that he knew Orthodox Jews take baths
once a week," Nwogu wrote.
As for appearing visibly sick, airlines and national agencies have their own policies regarding assessing "Fitness to Fly" (e.g. here's the UK's guidance) and may require passengers with certain conditions to have an assessment made and/or bring a medical certificate.
The International Air Transport Association (IATA) have a "medical manual" with general guidance on matters including "Efficiently deal with sick passengers", but this is a reference resource rather than standardized policy.
Ultimately, it comes down to a case-by-case judgement call by the crew. It's not uncommon for flights to be diverted or forced to make an emergency landing due to a passenger appearing critically ill or in need of treatment.
Here's a tragic and grisly example from 2018 of both events:
Passenger taken off plane for 'horror' smell dies
The passenger whose illness caused a Transavia flight to make an
emergency landing last month has died.
[The passenger] was diagnosed with tissue necrosis — which causes the
premature death of cells in living tissue.
...In a statement to Euronews earlier this month, the airliner
Transavia confirmed the emergency landing was because of "medical
reasons," but did not say if it was due to the man's odour.
However, due to privacy legislation, the airline said it "cannot
disclose details about individual cases."