If you want to have a setting where all of these fantasy elements openly exist and nothing else about culture is the same... that can be internally consistent, but you've already got something majorly unrealistic. I think it can handle a few female guards. Unlike elves, women actually exist.
I said some groups use the game to "play out the myths and legends of past cultures". As [MENTION=18182]Dire Bare[/MENTION] pointed out, "realism" in the context of this conversation means something different than complete historical accuracy; it means maintaining the suspension of disbelief. The goal here is to be "realistic"
with respect to the myths and legends, not to the actual history. The players aren't looking to jump into the actual Dark Ages -- they're looking to jump into the literary world of Sigurd or King Arthur. Just as the players in
The Dresden Files aren't looking to jump into the real world -- they're looking to jump into, well,
The Dresden Files. And in these worlds,
both elves and women (and even elf women!) actually exist.
Maybe some examples from contemporary fantasy would help illustrate what I'm talking about.
Good example: J.R.R. Tolkien. His Rohirrim are Anglo-Saxons, institutionalized sexism and all, because he wanted to let his imagination loose in the world of Anglo-Saxon literature, and a world where women warriors are as normal as men would not look much like that world. But he also wrote a female character who is fed up with being sheltered and rides off to commit some acts of righteous violence. Eowyn's story arc would not work in an egalitarian culture; much of the drama arises from challenging implicit assumptions made by the male characters (and perhaps the audience). The sexism is a part of the narrative, even though the narrative obviously isn't endorsing it.
Bad example: Robin Hobb. In
Assassin's Apprentice, there are female characters who, like Eowyn, chafe at being confined to their chambers and not allowed to lead lives of action. But there are also female guards, including the guard captain. The juxtaposition is jarring and inconsistent. It doesn't work for the story.
Good example again: Jim Butcher. His Alerans are based on Romans, but their social, political, and magical circumstances are completely different. He's not going for a Roman legend theme (it's actually more
Pokémon-versus-
Starcraft). Women in Alera matter-of-factly hold positions at all levels of power, and the female deuteragonist is a badass secret agent. Their gender is consistently unimportant in-universe and unimportant to the story.
You don't
have to emulate historical cultures in D&D. If you want to run an original, Alera-like culture where women guards are unremarkable, great! But you
can also run a more historical, Rohan-like culture where gender roles are sometimes a plot point. This is sometimes desirable because it allows you and your players to tell different stories than otherwise. The key things to remember are simply: (a) apply cultural norms consistently to maintain suspension of disbelief; (b) play women characters (and men too) as individuals informed by their culture rather than as robotic slaves to their culture; and of course (c) don't make anyone at your table feel uncomfortable or unwelcome.