I read a story, probably a short story back in the mid 1970s. Read it between 74 to about 77, but think the story itself was older, probably a book/magazine found/read in the school library
In the story a man travels to another world, the method of travel I have forgotten.
The people of this world might have been ape like humans/human type, but not "the planet of the apes".
On this world everyone over five or six years must carry at least one gun, like in the old west. They also must take training on the use of their gun(s).
One law was a person could not draw their gun except for self defence, self defence meaning someone else draws their gun first. It was legal to kill the person who drew their gun first.
I am not sure if this was a book length story (I don't think so), a short story in a book of short stories by an author, or a short story in a magazine (Galaxy type). I do think it was a story by one of the major (Niven, Clarke) science fiction authors of the time.
Another thing I might be remembering (maybe wrongly), the people of the planet/world are hairy/have fur (what I remember as ape like) and I think clothes were not worn/very minimal except for the belt for the gun and maybe a slash over the shoulder.
One reason for everyone to have a gun was to lower/prevent gun crimes, you draw your gun first and everyone near by could shoot you.
More information if I remember it right: The man meets a female who tells him the laws of town/world. I think the female might have been a sheriff or similar type of person. There might have been one or two gun fights soon after the meeting.
I think it was more of a short story(maybe only a few pages), since I don't remember much more of anything happening in this story. Quite sure it was not book length, but might have been in a book of short stories, which might make it harder to pin down.