In recruit training you call every one Sir or Mam. From the General to a slick sleeve just graduated PVT plus the civilian employees. Easiest way to remember it is this. If they ain't a recruit they are Sir or Ma'm.
In the fleet your better off addressing everyone by their rank. As in
Yes LCPL.
Yes CPL
Yes Sgt.
Yes Staff Sergeant
Never use Sarge to a Sergeant. And although you may hear another SNCO address a Staff Sergeant as "Staff" you use Staff Sergeant. Or suffer
Gunnery Sergeants are addressed as Gunny with no problem.
1st Sgt's are always addressed as First Sergeant never Top.
Master Sgt's may be addressed as Top but some don't like it.
Master Gunnery Sgt's may be addressed as Master Gunny or Top depending on their preference.
Sgt. Majors. Are addressed as Sgt. Major or Sometimes Sgt. Major Sir.
All Officers Commissioned or Warrant are addressed as Sir. You may here at times an NCO or SNCO address a Warrant Officer as Gunner, a Lieutenant as L T or the CO as Skipper but don't you do it.
If the CO is present and a Sergeant Gives you an order you say.
Aye Aye Sergeant. Or Yes Sergeant. The Company Commander being present has no bearing on your response to the Sgt.
If the CO gives you an order you say Aye Aye Sir or Yes Sir. Just as you would recieving an order from any Officer.
The guys that are irkin you are Boots we all were once and you will be too. They like to think that Graduating makes them experts on the Corps to everyone on civvie street. I ,they and you will or have grown out of it
Once they get out of school and into their unit they will realize they ain't as "salty" as they'd like to believe.