This probably isn't the answer you were looking for, but: it has to be differentiated using context (via. the subject of the sentence, as well as circumstance).
While this is probably pretty obvious, to break it out a little:
- If you say 「(太郎さん、)明日のパーティーに出られますか?」 to your coworker 太郎, it is pretty unambiguously the potential.
- If you say 「(先生、)明日のパーティーに出られますか?」 to your teacher, it is ambiguous.
This type of ambiguity is quite often resolved by context though (as one might expect):
「太郎はパーティーに出るけど、次郎先生はどうかな。」
「次郎先生もパーティーに出られる。」
「明日のパーティ、誰が出ますか?」
「次郎先生が出られます。」
A point here is that, in the cases it is ambiguous, it is often not ambiguous in a way that particularly matters:
- "No I can't" logically implies "no I won't"
- "Yes I will" logically implies "yes I can"
- "Yes I can" usually suggests "yes I will" unless specifically stated otherwise
- "No I won't" is probably the hardest response to deal with if you were asking about capability, and in this case you would probably just ask for clarification.