Agree with the others. It`s a minor cut/graze and cleaning it with a little salt water and a cotton ball will be fine.
Then just leave it alone. I would only be concerned if the cut became oozy or swollen.
Removing the Ikea filing shelf may be a good move but maybe look at paining it with a thick layer of safe paint to prevent any splinters or pitfalls before putting it back in, or better still, use something more solid. It`s easy to overlook things like splinters, areas where a hamster may put it`s paw and get it jammed in (or a tail!) and easily become trapped or hurt, so inspecting all the areas around the cage and what`s in the cage for any possible dangers, albeit small, is essential.
Hope Lentil is none the worst for her raw tail! x