Are old, rusty fencing blades that sat in a bag for years still safe to fence with?
Usually yes, as long as the rust is only on the surface and the blade is straight, with no cracks or deep nicks. Steel does not wear out from sitting in a closet. What weakens a blade is repeated bending in use and rust that eats into the metal, so the real question is how deep the rust goes. A thin orange film that comes off with a sanding sponge is cosmetic. Pitting, meaning small craters you can still see or catch with a fingernail after cleaning, is where cracks start, so retire that blade, along with any blade that has a kink or bend that will not come out or a visible crack line.
To clean one, rub fine sandpaper, emery cloth, a sanding sponge or a rust eraser block lengthwise along the blade, from the guard toward the tip. On electric foils and épées, work carefully along the groove so you do not sand through the wire's insulation. Wipe the dust off, then put one small drop of light oil on a cloth, rub it in, and wipe again with a clean cloth until the blade barely feels oily, because a greasy blade leaves marks on your opponent's whites. Clean the guard and the electrical contacts inside it to bare metal too. In épée this matters for scoring: rust on your own guard can act as insulation, so a hit that lands there may light up as a touch against you, and the rules say the referee will not annul it.
Electric blades also need a quick electrical check, since years in storage can dry out the glue that holds the wire in its groove and crack old insulation. With a multimeter on its lowest ohms setting, measure across the socket. A foil should read close to zero at rest and go open when you press the tip; an épée is the opposite, open at rest and close to zero when pressed. The limit for the weapon is 2 ohms. On an épée, also test each wire against bare blade metal, and on a foil test the wire against the blade while holding the tip down: either way you should get no reading at all, and any reading means bare wire is touching the blade. Reglue a lifting wire, and check tip springs with the test weights (500 g for foil, 750 g for épée) before a tournament.
If you have no meter or weights, ask your club armorer to put the weapons on a box, which takes a couple of minutes. Expect regular carbon steel blades to rust much faster than FIE maraging blades, which are made to resist corrosion but still rust if neglected. The usual cause is storage: weapons packed next to damp whites in a closed bag. Wipe blades dry after practice and keep them away from sweaty kit. If the rest of that old bag includes a mask, check it separately before anyone wears it.