If one or more stands in a unit leaves the table edge ........, roll a D6 and then concult the table below...
To me, it clearly means you should roll immediately.
However...
Units that leave the table as a result of retreating from combat cannot be pursued by their enemy even if they reappear immediately. However, a unit that reappears immediately can potentially be a target for an advance from another combat.
And from the combat section:
A unit that cannot pursue an enemy because it cannot reestablish contact is not allowed to advance instead. A unit can only advance if all the enemy units it is fighting are destroyed. See Advance p49.
That means that if you push an enemy out of the table during the combat, the unit fighting it cannot pursue or advance. It can only stand ground or fall back.
However, if you have another combat close by and manage to advance with another unit, you still can finish the enemy off.