How to create a small heater from batteries
My gut feeling is that using that kind of battery to create any more than a hand warmer is not very practical. To get an estimate if the idea of a battery powered heater is doable you have to look at the energy needed:

When heating things the energy is used to do two things:


raising the temperature: to heat 1kg of water from 30°F to 60°F you need the following energy: (4180 J/K) * 16.7K = 70KJ (heat capacity times temperature difference in Kelvin). For reference: An alkaline AA battery has about 9360J (source). You can substitute your own data for e.g. your pipe (water filled?) combination to get the result for your application.
replacing the heat that is lost due to bad insulation: If e.g. your pipe is warmer than the ambient temperature it will get colder. Here you can also calculate the energy that is lost this way: P = (Temperature difference) / (thermal resistance) with P being the heat lost measured in W (= J/s)


I would start with plugging in the numbers for part 1 and then add an estimate for part 2 ("if I use insulation X, how much energy would I need to have the temperature be constant for time X?"). Then compare the energy needed with the amount stored in the type of battery you want to use.

I think you can assume pretty much 100% efficiency, but better have the batteries be warm or they will not deliver their full power.