It's possible that you could move from another university to the University of Edinburgh and finish your PhD there. You should send in your application to the university as usual and get in touch with them to explain what's going on.