I do something similar for my hospital/qt tank. I don't have a heater small enough for a 1 gallon, so I fill my old empty 5 gallon halfway and put the 1 gallon in there. It's nice because the small tank is easy to do 100% daily changes on, but it still provides the fish more room than floating it in a little cup inside its main tank, which is a common qt setup. I was lucky I had the 5 gal on hand but Rubbermaid containers are a great inexpensive idea for emergency situations when you need to heat small tanks or multiples with one heater!
The outside water does heat the inner tank, but I've found that the 1 gallon is usually a couple degrees cooler than the water in the five, so I just set my heater two degrees warmer than I want the water to be and check the thermometer several times a day, just to make sure everything is still where I want it to be.