Gabapentine with Dexamethazone
My Lily's on Gabapentine with Dexamethazone for the scratching. We saw a specialist dermatologist as well and the result was that Lily's also got dermatitis which causes her to scratch and rub her nose aand chin, lick her paws etc. This doesn't explain the limping (unless he happens to have a self-inflicted via too much licking or accidental injury) but it might also be at play. Additionally dermatitis can make them more sensitive in their ears (where there is of course skin too) and where your dog may or may not also have PSOMS which could have shown up on the MRI.
Good luck with it. It's hard to narrow everything down but try and stay hopeful; it might be a more benign and more easily treatable cause.