Yes as you suspect it can be due to Urinary infection.
can cause crankiness, refusal of food and crying at nights, but not lethargy
Have him seen by your Pediatrician
Get his urine microscopy and urine culture done.
Based on the reports your doctor will suggest you antibiotics.
You may give him teethers for teething pain along with oral Acetaminophen
in a dose of 15mg/kg/day given 3 to 4 times in a day to ease the pain.
Give him plenty of water, juices for his urinary infection. Cranberry juice will be of help.
Hope my answer helps you.
Wish your son good health and a speedy recovery.