The cowboy hat can be found only in civilian areas and vehicles.
It was added in the 13-W18 update along with a recipe for the Campfire and fixes and new features for holstering.
It is enabled for all skins, however the skins with existing headwear look a bit odd.