A ball python turning down food is nothing new.

Without knowing all the details of your set up and the age/size of the snake--it could be one of a thousand possible reasons. I think being 'afraid' of the rat is one of the less likely possibilities.