No, I don't think the rat's bedding caused the snake's infection, but the rats themselves are not germ-free, nor are WE humans. Most pathogens favor certain species, but not all- there are plenty of zoonotic diseases around.
The rats should NEVER be kept on cedar shavings, EVER, as it irritates their lungs & causes health problems for them. Pine shavings are okay, in my experience, but if you have a brand or version with more volatile oils, that too can cause problems, but mainly it's cedar (& things like eucalyptus- but I know of no shavings sold made from eucalyptus trees).