He is not aggressive, he is frightened when he is on the lead because he is retrained. I haven't got my head around why he seems to be aggressive when he is off lead when the other dog is restrained.
In the wild and when our dogs are loose they do not walk straight past another dog, they CURVE or sometimes they go into a play stance to see if the other dog is friendly. If your dog is restricted by the lead, he cannot follow his natural instincts. For now try to keep your distance from other dogs. When he is on lead you must either CURVE or cross to the other side of the road. If he barks or growls don't chastise him or pull on the lead, you must ignore his barking and keep silent.
When he looks at dogs from a distance without barking or growling, praise him and give him a treat. Eventually your dog will realize that looking at another dog without barking, prompts you to praise him and give him a treat, he will stop barking. I suspect that your dog will play happily with another dog if he is off lead in a safe fenced area.
Training classes are brilliant for socialization, unfortunately at a class he will be restricted by a lead. Wait until you help him to overcome his fears before you join a class, at present it would be akin to throwing a none swimmer into the deep end.