The way the Navy used it it was just a title given to the captain with most senority and placed in charge of a task force or other group of ships to differentiate him from the other captains and not an actual rank itself. But the way they kept referring to Decker in that TOS episode it seemed like they were using it as an actual rank between captain and admiral.
Actually the Navy still uses Commodore for those Captain's that are in charge of Squadron's of ships. However back in the 60's it was the actual One Star Admiral rank (ie Rear Admiral Lower Half), but then there was confusion (since Officers are so easily confused ) between those who had the Rank of Commodore and the Position of Commodore (since those guys were still of Captain rank). So the US Navy did away with the One Star rank entirely. At this point it, when you got proomoted from Capta into a Flag rank you jumped up immediately to a Two Star rank of Read Admiral. However the other services didn't like this and they complained. So the Navy re-created a One Star Rank and called it Read Admiral Lower Half, and renamed the Two star Rank to Rear Admiral Upper half. Conversationally, you would call either Rear Admiral or just Admiral.
How do I know all this? 17 years i the US Navy.. So far