Working on this now, is this something that could work visually?
When you cast the spell on the item:
When you click the gossip option:
If you click cancel, then nothing happens. If you click accept, it removes the old item, and adds the new one.
If you find me a spell that would be usable on ANY item, then I can finish this for you
I personally can't find one that requires an item target, as well as working with ANY item, so this might have to be handled differently, unless you want to use a custom spell and a patch that is.
We can also make it work as a quest, however you would need to make a separate quest for each item to be upgraded