That reminds me of the time when I first got stationed at Fort Bragg and I told an NCO to 'eff off' because I thought he was just some GI trying to hit me up. It was after dark and I was outside my barracks just having unloaded my car and he started talking to me. I couldn't see his rank and said what I said.
Come to find out he was making sure I wasn't leaving my car parked in a no parking zone. I was in front of the CO pretty quick. I explained that I was brand new there and honestly thought the guy was trying to start a conversation to hit on me. Thankfully I didn't get into trouble, but man was I biting my tongue after that!
You never know who you're talking to.