It would be a divergence from their past actions, but I don't see why not. It's their platform.
> How could the White House impose a private service to operate the account against their will?
Why would they? @Potus would likely just move to another service and continue as if nothing happened. Gab.ai would love it if this happened.
> What would happen if Twitter decided to ban the President because that could avoid a war?
I see no way this would have a major impact. POTUS has the attention of the world's press, it's not like losing a Twitter account would stop him from speaking to his audience.
They couldn't, and shouldn't be allowed to. The government shouldn't force any private entity to do anything against their will, certainly not ban speech, when no laws are being broken.
The right to free speech extends to everyone, including idiots, racists and sociopaths. The problem is not where Donald Trump as a person falls within that set, but that Americans elected him President, and decided he should be the one to steer the ship of state, command the army, and control the nuclear arsenal.
This despite his having an established Twitter history that put his derangement on display. It's not as if no one could have seen this coming.
What should happen is the American people should not elect a President who could start a war over Twitter if it was possible to do so - someone with actual personal restraint and tact. But they wanted a troll to run the country, and now they just have to deal with the consequences.