You can always cite an answer with the flair name; for an academic citation, that would be fair in most journals, given that the answer is public and the name is unknown.
I cited an interaction with a redditor who responded to an AMA I did, providing excellent information about her family's traditions about tommyknockers in Utah. Several years later, as I finished work on the book manuscript, I reposted what I had written asking for the user to clarify some points. She kindly reappeared and provided additional information. I don't know - and don't need to know - her name (she did reveal her gender). The citation stands with anonymity. As it should!
You can always PM a user to see if they wish to be cited by name. I freely disclose my name on this cite, but others don’t wish to follow that path. If you let someone know you wish to cite their work, they should be pleased and the matter of identification can remain a private choice.
I assume there's people who are okay with it, and some who might not be. Some do link to their publications and the like in their askhistorians flaired user profiles (I reckon that you can find those somewhere by navigating the sidebar), which should be a pretty strong indication of the former.
(EDIT:) I would also say that there may be a reason that the username does not match the real name, and a citation to a Reddit post should really go under the user name, since that is the identity being used in this case (although you can ofc annotate that user X is actually person Y as per their profile).
Other users have addressed the question of citing Reddit posts, but to address the etiquette of asking for names, publications etc:
There's no one-size-fits-all policy here. Some users are relatively open about who they are and link their Reddit profile to their professional existence in various ways. Others are much more guarded for any number of reasons. A useful rule of thumb here may be following our Twitter account - users who have explicitly given their permission to be tagged as a post's author will be shown there as their answers get linked. Naturally, that won't cover every user you might be interested in, but it may be a starting point.
Many flairs also have a flair profile, which may contain a policy on whether or not they're happy to receive DMs. If they are, they would presumably be open to being asking about their published work, though the answer may of course still be "no". You could also ask "have you published on this yourself?" as a follow-up on an answer you enjoyed, though we wouldn't blame anyone for not responding to such a follow up. Ultimately, it's an anonymous platform and we respect our users' right to determine how much personal information they're comfortable sharing, and would certainly expect that no one would seek to push them to, or publish someone's identity without explicit permission.