I had this happen with a windows share once , I cant remember what I did to get rid of it in the end. I think I had recreate the share as it was, I could then remove it from Roon, then remove it from Windows.
As I understand you want to remove the folder media? Shared folders can only be removed in your Nas I think. Not an expert but had this once long time ago. What if you restart your Nas?
After a bit more troubleshooting a reboot of the ROCK server fixed the issue. The “X” then appeared and I was then able to remove the reference and re-create.