Don't ask; tell
You think that you know this person well enough that you should know each other's ancestries. That's your opinion. The other person may have a different opinion. Since you are the one who believes that this information should be shared, share yours. Your information is entirely under your control. You can choose to share or not share. That's entirely up to you.
If the other person agrees that you know each other well enough to know each other's ancestries, the other person will probably reciprocate. If the other person disagrees, you may have mildly overshared but you haven't put the other person on the spot with an intrusive question.
In a comment, you said
I'm neither American nor Asian, and I don't quite understand why such questions are thought of as being rude by default. The scenario I can think of does not have any negative connotation. For example, if I live or lived for a long time in say Korea or have a Korean spouse and if I suspect that someone I'm talking to (in the US) is of Korean descent, then knowing the latter may help find us some topics for discussion in which we are both interested.
Right. So again, I suggest that you tell your datum to the other person. Then the other person can let you know if there is commonality there.
For example, you might say, "My spouse, being from South Korea, is really picky about Kimchi. We went to a Korean restaurant and I ended up eating the whole thing because it wasn't authentic enough." The other person might then respond, "My great-grandparents came from Japan, but I don't even like Japanese food myself. I prefer Italian."
Of course, you should pick an approach that fits your actual situation. This is just one possible approach based on the very small knowledge that I have of Korean culture. The key point is sharing what makes you think that you'd have something in common with someone who was Korean. Try to fit it in naturally with the flow of conversation rather than forcing it. This may involve sharing other parts of your personal history as well, so that the Korean portion fits into the narrative rather than sticking out as the only thing that you want to share.
Most people will reciprocate with similar information when you share yours. But they won't feel put on the spot to do so. It is just natural to share information when someone else shares.