There are several ways that you could prepare branches to make them pet-safe. As long as it doesn't have pesticides on it or is obviously infested with something, you could just bang it out and put it in the cage. However, especially with the risk of fleas or other parasites, freezing for minimum 24hrs but ideally 48hrs would be recommeded. If you really wanted to cook it you could, but be very careful with which kind of wood it is...sometimes, cooking it can sometimes create fumes that would actually be worse then anything that would be living in the wood (I think this mostly applies to cedar and pine which shouldn't be used anyway, but there may be other types of wood that react similarly) If you have a 'safe' type of wood and you really want to cook it, do so with low heat (200-250 degrees F) for an hour or 2, but no longer. Always have your fire extingusher ready when cooking wood!! If it starts to smell bad or smoke, take it out right away!
I've heard people say to soak wood in bleach, but I don't agree with that because I don't see how you would be able to get all the bleach out. Pressure washing or just a good scrub-down would be more advisable.
Personally, I only use fallen branches that have been sitting on relatively dry ground. I then peel the bark off, bang it out and stick it in the freezer for 48 hrs (If it's dirty, I would scrub it and let it air dry for a day or two before freezing it). Admittedly, I've never used branches for rats, but I've never had any problems this way. If you have access to it, I've found that Elm is awesome for use in enclosures/cages :thumbup: