I can't answer that..
since "
Depends" or "
Yes and NO" would be my answer of choice
The thing is, dielectric grease might prevent (or at least retard) corrosion if that is due to
humidity or moisture
applied to the batteries.
But most cheap batteries corrode from the inside as well.. and you cannot stop that in any way.
And with that it's all open for leakage again.
Now leakage on the other hand can not only be caused by corrosion, but by temperature cracks, shocks and even overvolting (temp cracking again) the cell.
So, drop a battery and you have a good chance of a leak, leave it in the car on a hot arizonian summer day and it'll most likely leak soon too..
The grease might actually help to keep control over the mess the leakage might cause inside the flashlight,
but not for long the acid will dissolve the grease and leave your battery compartement filled with a sticky, gooey, and maybe even stinky mess of 'not even grease anymore'
So I wouldn't even try.
heatshrink is a much cleaner alternative to improve the outer lining and catch possible leakage.
But be careful with the applied heat of course

Also make sure the wrapped battery still fits your flashlight.
having a non removable battery isn't fun at all
'sid