Is it allowed to take a small but sharp grater to Ryanair cabin baggage?
What you are allowed on your flight depends mostly on the security where you get onto the flight.
As Ryanair is mostly active in Europe, I assume you will be under the European rules.
For ease of use, as it is in English and the UK is still part of the EU at time of writing, I got the Heathrow list of banned items for hand luggage.
This includes knives (with blades over 6cm), razor blades, box cutters, scissors (with blades over 6cm from fulcrum), axes, hatchets, cleavers, ice axes, ice picks, swords, sabres and sharp or pointed martial arts equipment.
I do not see any graters on it. But you can work out from the items mentioned that knives blades over 6 cm are not allowed, whatever way they are set in handles.
Most graters had holes that are only a few mm across, but some also have a bigger opening for making slices, that might be over 6 cm. If so, it will be better not to take it, as it might be considered dangerous.
If you fly from outside the EU, check the site of the airport, or even the airline, usually there is a list of forbidden items.