But guinea pigs are also rodents, they have a similar scent to rats and mice, which are natural prey.

Ferrets are NOT rodents. Their natural prey is actually mice as well, they're obligate carnivores. Not to mention their very distinct smell. All those factors mean that a snake would probably never even consider going near a ferret, let alone try to eat one, unless maybe it was starved.