Interesting, I've had two congenital hernias repaired, (I'm 17), with the last one just a couple weeks ago. From my understanding and from what my surgeon/doctors have said you should be able to continue all activities, heavy squatting deadlifting manual labor jobs... etc when it heals.
However, if for some reason you cannot squat heavy anymore, yes, you can make gains without squatting. You may want to look into single leg variations which you may be able to do since the weight would not be as great. Either way, check with your doctor/surgeon before doing anything.