In the Star Trek TNG episode: Night Terrors, we see Guinan using a rifle in order to break up a brawl at Ten Forward:
In a hilarious piece of dialog she immediately admits that this rifle is not Starfleet issued:
GILLESPIE: What is that?
GUINAN: It's a little souvenir I picked up on Magus Three. That was setting number one. Anyone want to see setting number two?
While Starfleet is not a military organization, it has similar structures (Captains, Admirals, enlisted personnel etc), so even though Guinan is a civilian, I doubt they would allow her to bring her own weapon on board.
So my question is: Why is Guinan allowed to have a non-Starfleet issued rifle?