Actually, its better to have it done outside than via dealer. Mas makakatipid ka. I learned this the hard way when I realized the dealer just does the underbody thing (not really sure kung rustproof yun) care of TufKote (SAVI), instead of full (pati inside panels, etc.).
Out of curiosity, I went to TufKote (SAVI) to check out their menu of services and found out I could've saved some money if I went directly to them (instead of car dealer). And they offer many levels of treatment.
As for the warranty, pareho lang may warranty.
The warranty is conditional to annual reapplication. Without the reapplication, the warranty's as good as worthless. Either way (dealer or direct).
And yes, I do believe certain car makers have improved their rust protection capabilities such that one doesn't really need to have it done outside after purchasing the car.
But if only for peace of mind, it might be good to apply it immediately upon purchase. And not just underbody portion. If only for peace of mind.