I’m looking for a story about a young man living in a society where individuals can carry a weapon, but must display a badge to indicate to others that they are carrying a weapon.
In Beyond this Horizon by Robert Heinlein, most people go armed. Unarmed people are the exception rather than the rule.
Unarmed people wear clothes to be distinctive - so as to not get involved in duels.
It could be "The Weapon Shop" by A E Von Vogt, but I do not recall the story having a badge as a story element.