Luffy and the gang could save Ace, and probably Whitebeard. Luffy just has to just stay close enough to Whitebeard to keep the fodder from hurting him, make sure Squardo doesn't stab him etc, and with Ace he just literally has to keep his brother from being an idiot. If need be, I am sure he could just knock him out and carry him out of the war just to make sure Ace does not fall for Akainus taunts again..
Luffy unleashing Fishman island levels of Conquerors Haki could take care of most of the small fish, and while I still don't like his chances against Admirals in a 1 on 1 type of fight, I still think him and Zoro now at the very least should be able to stalemate them better than Marco and Jozu did. It's not that hard with prior background knowledge like Luffy has and his substantial power boost for him to help Whitebeard win the war. Teach and Shanks might very well show up, only to realize that the war is over and Whitebeard and Ace are already gone.