I have done it. First make sure you have enough room for the tank. Mine had an Atwood tankless. I swapped it for an Atwood tank. The tankless was almost as deep as a tank, plus my trailer was built when tankless was pretty new and could have been ordered with either. Mine already had two switches in the control panel to turn on both gas and 120v heating sources. I did have to add a breaker and run romex to the tank heater to power the 120v element.
Also check the size of the cut out in the wall to make sure the replacement will fit.