That is not a good idea. You might get it done on the battery’s one end, but the opposite end with a plastic or rubber prevents electrolyte leakage while acting as an electrical insulator. Direct soldering can damage that seal.