While we're on the topic of sexism, asking a bartender if they know how to make an old fashioned is also a question that's usually directed at women.
Although, I did once enjoy the smug satisfaction of hearing my male coworker being asked if he knew "how to craft a Manhattan."
The thing is, an old fashioned is so simple and such a staple that the vast, vast majority of bartenders know how to make one.
Your greater concern should be if the bar has the means to make one. So rather than ask if the bartender knows "how" to make one, ask a variation on, "Do you make old fashioneds here?" or "How do you make your old fashioneds here?"
For me personally, rather than ask, I scan the bar to see if I can spot a bottle of Angostura bitters, easily spotted by its trademark oversized label.
But if the bar clearly doesn't carry bitters, sweetener, or oranges, maybe just don't ask in the first place, and grab a beer and a shot instead.