Translation:Which side are you on?
Can these mean both "which side of something are physically on" and "figuratively which side of a debate are you on" ?
Yes, it can mean both.
What would be the difference between 'Aan' and 'Op'?
You can't use "op" in this sentence.
"op de kant" usually means "on the shore" or "on the side of the pool".