You didn't say what was actually "rusted out".
Or if "they" said it was easier to get the entire VEHICLE refurbished rather than buying a new one (certainly cheaper).
There are a lot of parts that are not needed for ONLY 2wd operation.
Ask the mechanic what he'd do if it was his and he just wanted to sell it quick.
If the transfer case is not STUCK in 4WD, and if you can move the auxilliary shifter LINKAGE to disengage 4WD so you are always engaging 2WD, and if the parts in the drivetrain that are ACTUALLY rusted (such as the front differential, front driveshaft, front driveshaft u -joints, CV joints, front wheel hubs, etc) don't prevent the front wheels from being unlocked from 4WD engagement and the front wheels can "freewheel", you may be able to drive in 2WD indefinitely.
By unlocking the front wheels from 4WD at one end and disconnecting the transfer case at the other end you are ISOLATING the entire 4WD part of the drivetrain from the 2WD components.
By the way, most of the drivetrain components are robust, it would be difficult for any of them to RUST OUT. Quite possible for them to rust though.