When you are in the UA you can hit any one that is 5 UA levels above you in the UA. (does not apply to top 5 that can hit the top 6). What rank they have in the Real Arena (RA) does not make a difference. So if you are rank 20 in UA and rank 5 in RA and some one from your realm is rank 18 in UA and rank 8 in RA you can attack. If you win you end up being rank 18 in UA but remain rank 5 in RA and the other player ends up being rank 20 in UA but remains rank 8 in RA.