It might be "any gun" from a break top Iver Johnson revolver to a Glenfield 30-30 to a Rem 788 in 22-250.
And actually,I have known each of those to ride in different rancher pickups.
Along with Ruger 10-22,Mini-14, AR-10,and SKS. A Blackhawk .357.
Ideas will vary,rancher to rancher. They tend to have their own ideas.
For some percentage of ranchers,its a tool you need when you need it,like a fence stretcher ,shovel,fencing pliers,etc.
If the tool serves to get the job done,GREAT! Time to move on to whatever else you were doing before you needed to shoot something.
You likely won't see Grandpa's 1886 ,or the elk hunting rifle,or some $4000 Arctic Warrior.
A typical problem is more likely to be a rabid badger than "Invasion of the Body Snatchers"
The ranchers of my acquaintance might deal with targets of opportunity,or if they actually witness a dogpack harassing cattle,etc. I suppose feral hogs are an exception. And since the urban Denver/Boulder Colorado types voted in Wolf introduction,the Ranchers who will have to live and deal with wolves may arm accordingly.
The ones I know generally aren't out sport hunting,even for coyotes or prairie dogs. They have equiptment to fix,fence to mend,windmills to set,
a sick cow,the Mrs wants to go to town,etc.
One other thing typical of the ranchers I know. They are not "posers" . They don't "gun up" to look a part. They don't much care what you think of their gun.Its likely to be someplace behind the pickup seat and you may never see it. The "Western Business Suit" is likely to be made by Carhart,Key,or Big Smith. Maybe Wrangler.
Some ranching jobs are still best suited to horses...but in my experience if its not the pickup its generally the 4-wheeler ATV.
And (the gun) its likely to not be expensive. In my experience,Ranchers have frugal/pragmatic side.