Do you want choice A or B? Yes!-- Is it wrong to answer with a yes when given two options?
If someone asks
Would you prefer to go shopping or go out to eat?
and receives the response
Yes
the response is ambiguous.
You cannot deduce which choice the responder has chosen because they haven't responded with one of the options.
Is there a rule that dictates which choice to assume the responder has made?
The circumstances might show which option 'yes' was answering, but otherwise you're right, it is ambiguous. In practice, it's most unlikely that any conversation would proceed along those exact lines.
In your example, it would be quite odd for someone to answer yes.
Compare to the following:
"Would you like to join me for dinner sometime, or go see a movie?"
"Yes, I'd love to."
Here, the second speaker isn't choosing between two options, but answering the implied question: "Would you like to go out?"
Sometimes the answer "yes" is meant to imply that they want both A and B, or they they want one and do not care which. This follows logically if you think of the question this way:
Do you want (A or B)?
The replyer wants (A or B) so the answer "Yes" is correct, if not exactly useful.
Her: Do you want tea or coffee?
Him: Yes
Her: gives him tea (or, if she feels he's being a smart-alec, gives him coffee with a teabag in it (based on a true story))
Note that in most cases a "No" answer is unambiguously rejecting both choices.