I think this is what happened to me on my first fetch mission. She said stay right there, so I stood there for a while and after probably two minutes it looked like she wasn't going to come up to me, so I moved and they all agrro'd on me.Sounds like you ran away from a Security Officer trying to scan you. I made the same mistake to start with.
Best to walk up to security early and get scanned. You'll be good for a while then.
I think if you only bring it out when you're facing a charge socket you might be fine. You do realize that tool can be used to stealth kill, right? That's why NPC's don't like it being brandished near them.
The second time I tried, I never got scanned at all and was able to walk into a hab. I had my scanner thing on overload since I thought I needed level two clearance and was about to stun the scientist and she did give me a verbal warning and said "Put that thing away". I switched back to normal mode and was able to continue walking around with it out no problems.
Now that you mention it, I'm not even sure how to holster it.