Technically yes, but only because salary and rank are heavily intertwined in the military.
The best example of this I can think of, are the various military bands in modern militaries - in order to attract capable candidates from the civilian sector, the military has to offer salaries commensurate with the civilian sector.
Often this means that they get quite a high rank to go along with their pay - looking at the USMC Band, on completion of their boot camp, new musicians get the rank of Staff Sergeant (E6), which has a minimum time-in-service requirement of 60 months and a minimum time-in-grade of 36 months - ie for a regular marine to be promoted up to an E6, they have to have spent at least 60 months serving, 36 of which must have been as a sergeant (E5).
Despite their apparent rank, you wouldn't trust a musician to take command of a full squad during a firefight.
The best media example I can think of, is Counselor Troi from ST:tNG - she's technically a LCDR and of the same rank as Data until very late on in the series, although she would most likely defer to him if the ship was under attack.
Incidentally, this is also the reason behind why you can wind up a British Royal Marine by asking him 'what instrument does he play?'.
That's not to say musicians never got involved in combat - the most memorable example I can think of, is Trumpeter Calvin Titus of the US Army. During the Battle of Peking (1900), he was the first to volunteer to attempt to scale the city walls while under fire from the Imperial Chinese troops and suceeded. He was awarded the Medal of Honor for this.
In the British Army, these are known as Professionally Qualified Officers - they usually get an abbreviated officer training course (informally known as the 'vicars and tarts' course) then get sent into the military to carry on being nurses, doctors, lawyers, etc.
That said, things have changed since I last read up on it - the PQO course now includes practical infantry knowledge so at the very least, they're not dead weight when the brown smelly stuff hits the fan. This is a response to RAMC medics ending up on patrol in deepest darkest Helmand, althoguh the shift probably started during GW1, when 3 of the 5 dressing stations were commanded by dental officers.