As far as the example though, well, that's a bit trickier since I'm not a big fan of the idea that classes actually exist in the game world, so, "Are you a fighter or a ranger" isn't really the important question, is it?
This comes back to the question of what is and isn't salient. As I understand the PHB, people in the Forgotten Realms know what classes are, and if you ask the gate guard or an innkeeper "are there any clerics in this city?" they'll understand the question, including the distinction between Acolyte (staff of a temple) and Cleric (can cast Cure Wounds). Any wizard knows that all other wizards, and some warlocks, have spell books. Paladins know that their Oath grants specific abilities, and they know that paladins who swear other Oaths have different abilities. If you want to play in a setting without classes as known categories, then IMO the 5E PHB is a tool poorly suited to that task.
OTOH, the fact that a character is more or less genderless is something that you'd think that 4 or 5 people in close, virtually every day contact with should pick up on. The fact that no one at the table actually realized this until a year into the campaign means that the player didn't do a very good job of portraying that character to the table.
As the person who played that character, I am biased towards disagreeing. I played Dexter as someone who *didn't care about gender*. Dexter cared about magic and music (as a Bard), knowledge (as a Sage and a Lore Bard), and defeating the cult of Tiamat. Dexter didn't have any interest in displaying masculinity; Dexter killed Tiamat's minions, ruthlessly and efficiently, without shouts of "Booyeah!", without post-combat fist-bumps. Dexter interacted with tavern staff by ordering food and drink, and asking about rumors, without any show-off "hey, watch me woo this wench". Dexter likewise didn't have any interest in displaying femininity. Dexter used Healing Word on comrades to get them back into the fight, and Lesser Restoration on sick NPCs out of generic genderless compassion, and didn't otherwise spend time nurturing anyone. The PCs, and their players, learned that Dexter was goal-oriented and mission-focussed; on the rare occasions of relaxation, Dexter was then all about music. I conveyed the character's interests *exactly* as intended.
If an NPC had ever taken a romantic interest in Dexter, then PCs (and thus players) at the table might have noticed Dexter's response; but the DM never played NPCs as having that level of personal agenda. Perhaps that's incomplete DMing. NPCs should notice PCs as "more than ordinary"; if someone asks the innkeeper "Who were your most interesting guests in the past year?", then the innkeeper's answer should include the PCs. Now and then, that high profile should provoke attraction. Then again, attraction would not necessarily (nor immediately) reveal what anatomy was under Dexter's clothing, not unless we ran a scene well past the point at which most tables would fade out or cut to commercial.
You mention Vaarsuvius from OOTS. V's sex is unknown. (Belkar has tried to settle the question, by examining V's genitals, when V was a lizard; to no avail.) V's *gender*, using the term socially rather than anatomically, is unambiguous. V talks - particularly, interrupts - like a man. V leaves V's children at home with V's spouse, following the default and norm for the father role in societies from Agricultural through Industrial ages. It's theoretically possible that Inkyrius sired the children and V bore the children, but V sure doesn't act like the one who nursed them.