I'm sorry, but this is terrible advice.
Keep the knife away from your snake and get a pencil or a chop stick. If the rats head is free stick the pencil in its mouth so it bites that instead of the snake.
I don't think you did anything wrong. I personally would have probably let the snake finish eating and simply kept it on clean bedding for a while if the damage wasn't bad / visible. When you see wild caught snakes, they have lots of scars from incidents like this and others.