I've never played RTW, but in MTW you always have the option to retreat to the nearest friendly province. I would never recommend it though, unless your king or some other unit that you just can't stand to have beseiged is there. If you can beat the invader, then beat him. If not, hole up in your castle until help arrives, thereby keeping the enemy from just attacking the next province down the line.