I have a very inconsistant bug on Minecraft Realms, aparently others are having simular problems, but i have found no reports so im writing this here.
In current Minecraft, there is a bug on realms that causes the anvil to glitch out. when the bug is active, items cannot be renamed. you can, but the anvil will refuse to give you the rename item with the output slot blank. After some testing, placing an item into the 2nd slot and removing it resets this bug. I have no idea what causes the bug or cuases it to go away. I would provide screenshots, but the bug stopped while writting this. ill screenshot it when it happens agean.
Related issues
Comments

Thank you for your report!
We're tracking this issue in REALMS-9214, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki