How to use 2 lattice to deform 2 spheres on impact
I'm not sure why you need to keep your 2 balls within one object, but you could try it with Lattice or with Mesh Deform or even with shapekeys.
If you want to do it with Lattice, scale the lattice it in Object mode (not Edit mode) so that it contains your 2 ball object, in the Properties panel &gt; Object Data &gt; Lattice, give it enough Resolution (i.e. subdivisions):

Now create a basic shapekey, then another one:

In Edit mode, squish your lattice the way you want:

Back to Object mode, keyframe the shapekey value to animate:

Here is what it could give: