You should remove that rat ASAP. It sounds like your snake is getting stressed out with the rat being in the enclosure. It also sounds like your snake prefers mice over rats.