Thank you for the query.
Yes, this can be inguinal hernia
indeed. Especially if your pain aggravates while coughing or lifting heavy objects. The lump can be visible in the groin.
Such symptoms can be also caused by variocele, testicle inflammation, epidydimis. Sciatica
due to spine disc herniation or nerve
compression by pelvis muscles is also possible.
I suggest you to visit your doctor, have physical examination, groin and testicle ultrasound
performed at first.
Hope this will help.