Is it fighting back while being constricted or just being defensive without being coiled?
If coiled: Put something in it's mouth. I use chop sticks. Wait till the rat passes before releasing it.
If not coiled: This is fairly unusual behavior for a rat. It is probably spooked or panicked. Most rats will just sit, explore, or groom itself. Take it out and wait until it's more calm before putting it back in with your snake. Keep it well fed and watered. A scared rat is a dangerous rat.