Is there a way to grate a block of cheese entirely without hurting one's fingers or knuckles?
By the wording of the question, I'm pretty sure you're using one of those pyramidal graters or a "sheet" grater.

That's great for getting the "bulk", but if you want to grate a small amount of cheese (or the last bit of a large amount, if you don't want to just eat it) then you really need to get yourself a rotary grater.  They're more commonly used for fine/hard cheeses such as Parmesan, but most half-decent ones will come with a "coarse" blade that can be used for cheddar, mozzarella and so on.

Rotary graters all have a plate at the top that lets you push the cheese down onto the blade.  Higher-quality graters will give you slightly better results; the $10 cheap ones tend to leave a mush at the bottom that's hard to grate, even if you squeeze really hard, but that's easily remedied with a small wooden block or really any object at all to put between the top plate and the cheese you're trying to grate.