To break down the question a little: Is Starfleet what would be considered a military service in our time? I think unquestionably yes. No matter what else it does, it fights wars. Pretty clear-cut.
Is it what would be considered a military in its own time? Maybe ideally a more nuanced answer would apply, depending on how that society has evolved and how it sees its institutions, but in the end the depictions often end up based on real-world models so I still say yes, a military service.
One thing that I always point out in these discussions is that there aren't an exact real-world comparisons for Sarfleet, because its most formidable threats can be encountered unforeseen in the course of its exploration. If the minor warships the Royal Navy sent on scientific and survey missions in the 18th-19th centuries kept being destroyed by previously-unknown bigger ships -- or sea monsters -- they would probably begin giving the scientists rides on ships with close-to-maximum fighting power, and exploration (assuming they chose to keep doing it at all) would take on a more "military" tone.
Well there were Technicians First Class Thule and Harrison mentioned in "Space Seed" and Yeoman Third Class Lawton in "Charlie X." The bad thing was that the officer rank of ensign and everyone below seemed to wear the same rank insignia: none.
Is it what would be considered a military in its own time? Maybe ideally a more nuanced answer would apply, depending on how that society has evolved and how it sees its institutions, but in the end the depictions often end up based on real-world models so I still say yes, a military service.
One thing that I always point out in these discussions is that there aren't an exact real-world comparisons for Sarfleet, because its most formidable threats can be encountered unforeseen in the course of its exploration. If the minor warships the Royal Navy sent on scientific and survey missions in the 18th-19th centuries kept being destroyed by previously-unknown bigger ships -- or sea monsters -- they would probably begin giving the scientists rides on ships with close-to-maximum fighting power, and exploration (assuming they chose to keep doing it at all) would take on a more "military" tone.
IIRC, in TOS, everyone had officer ranks. Sure, they had "Transporter Chief" or "Security Chief" or "Yeoman", but those seemed to be more titles than ranks or grades. Everyone seemed to be out of Starfleet Academy.
Well there were Technicians First Class Thule and Harrison mentioned in "Space Seed" and Yeoman Third Class Lawton in "Charlie X." The bad thing was that the officer rank of ensign and everyone below seemed to wear the same rank insignia: none.