ive had characters that have gotten rested xp from logging out in the world and some that havent, i dont know if its a bug that u get it if not in a cantina but it does happen, however the rate at which u gain rested xp is far superior when u log off in a cantina.
p.s i have a lvl 25 that hasnt touched nar shaddaa yet