Just tried and it worked...
Here is what I did...
I had DWG that contained xrefs... I typed "RENAME" command and selected Block in dialog box... Then I searched for XREF name I wanted to be renamed and typed new name... Then I go to root where are saved my Xrefs and copied old named Xref with new name... Then back in CAD I typed "XREF" command and there I found newly named Xref... I clicked on it and scroll down to see saved path... It was written old named *.dwg... If it's relative path, or no path, just replace old name with new name .dwg... And if it's full path, you can click on icon on right for browse and then click on new *.dwg in folder it was saved (created)... And that's it... This should work, so no need for LISP...
HTH, M.R.