Can the overflow pipe on the water heater be screwed off to replace it with a longer one?
Assuming you are talking about the temperature &amp; pressure relief valve discharge pipe, yes, and that is generally a good idea to do. The closer to the floor the discharge pipe terminates, the less chance there is for scalding should it ever be used. In fact, it should terminate no more than 6 inches above the floor. InterNACHI (the International Association for Certified Home Inspectors) has a page on this for items for home inspectors to check, of which a few are notable here:


  
  discharge to a floor drain, to an indirect waste receptor, or to the outdoors. 
  
  
  not terminate more than 6 inches (152 mm) above the floor or waste receptor.
  discharge in a manner that could not cause scalding.
  
  


Note, the discharge pipe should sit right above a floor drain; if you don't have a floor drain, you may want to consider installing one or discharging the T&amp;P relief system elsewhere (e.g., outdoors, if your climate permits it).