Upvote:3
It is going to be a problem. If you're no longer employed at your company's UK site then the basis for the visa no longer exists and so it is invalid even though it is not expired.
You should not have too much trouble getting a visit visa to attend a private medical appointment. Do be aware that you are no longer allowed to use the NHS because you're not a UK resident any more.