When did medical personnel join the command staff?
Ship's Surgeon has been a Ship's Officer since the 1600's.
The ship's CMO has been part of Naval Ship's Senior Staff since day one in the US and UK Navies, and all their imitators. Including Traveller.
He's not in the line of Command (being a Staff Officer/Limited Duty Officer), but he is part of the Command Staff. Fleet Surgeon likewise for the fleet.
What they aren't is Bridge officers... except in a couple rare cases (Hospital Ships). Unless the Captain wants them to be, in which case, he can do so, but he may not remain a captain too long if he does.