definately get it checked
yes, a hernia can cause pain in the scrotum
most common is a hernia in the area of the 'anulus inguinalis superficialis' - this is where you can see and feel the 'lump', the nerves for the scrotum also run in that area, so if the hernia puts pressure on these nerves the pain can flare into the scrotum
however, there is also the possibility of the hernia descending right into the scrotum, or the upper thigh, which is less probable, but still possible
general symptoms are a 'stinging', slightly 'tearing' pain in the inguinal region when coughing or lifting objects from the ground (in other words - everytime the abdominal muscles are used)
better get it checked out