Well... technically speaking cancer is a mutation of the DNA in various tissues that inhibits or no longer produces proteins or enzymes that prevent the over-stimulation of cell growth and division. Since cancer isn't contagious, I'd imagine its fine. Secondly, I'd say its probably fine because the rat mutation wouldn't be able to affect the snake DNA.
On the other hand... who knows what kinds of carcinogens were used to cause the rats to contract the disease in the first place. If it were a chemical injection (pretty common) then any lingering amount of it in the rat may be capable of stimulating the genetic mutations in your snake and cause it to develop its own cancer... I don't know if this could actually happen, because they may use something that's targeting something specific in the rat genome, but in my opinion I wouldn't use rats that had been "given" cancer. I would imagine it is probably be ok to feed rats that had contracted the disease on their own, however its still not something I would want to risk. $100 a year is well worth it for the peace of mind.