Can a sub attack a lone sub in axis and allies and the attacked sub submerge?
Yes. Submarines that are not under threat from an enemy destroyer can use their special ability to choose to make a surprise strike (either on attack or defense) or choose to submerge. This occurs before any dice are rolled by either side.

From Axis 1942 Second Ed. Rules, P14, General Combat, Step 2:


  Before the general sea battle takes place (steps 3–5), both
  attacking and defending submarines can choose to either make a Surprise Strike die roll or submerge.


If an English sub attacks a German sub, as there are no destoryers present on either side, both will have the option to make a surprise strike or submerge.

I am not sure where you get your understanding that a) other sea units (besides subs) need to be present, and b) only if attacker and defender both have submarines, these are both incorrect.

Two things to note about submarines:

As there are no other enemy (surface) warships present, any 'surprise' strike would effectively not be 'surprising'.. both submarines would get a suprise strike at the same time. The attacker rolls a surprise strike, and then the defender rolls the surprise strike on defense. Any hits are then removed.

The whole process starts over again once casualties are removed, so the choice to submerge or surprise strike (remaining in combat) is made before the attacker rolls attack dice.

Typically, the defending sub would choose to submerge, as it defends on a 1.