A court has ruled that Mayor Rob Ford can remain in office pending the outcome of his appeal of a judge’s ruling ordering him out of office.