On what grounds would they stop you leaving? If you are a lab-based PhD and haven't completed the work, then yes I can see why they may have a problem. But most supervisors are acutely aware that funding runs out and people have to move etc...
What would his motivation for making you stay be?