While hematuria can be from a number different things in a man, this could be a kidney stone. Other causes include possible urinary tract infection
and yes, dehydration
can cause flank pain
sometimes too, and vigorous exercise can cause hematuria. In addition there are more rare reasons for this such as inflammatory kidney diseases (including autoimmune causes) and masses.
But since there is hematuria, it must be checked out to see what the cause is.
I recommend you go in to be seen. They will do an exam and collect a urine specimen at the clinic, and can do a dipstick test to get some basic information such as whether there are signs of bacteria. The urine should also be sent to a lab for complete urinalysis
and possibly culture. And then a "KUB" (kidneys-ureters-bladder) X-ray can help provide information too, such as if there is a stone. Stones often contain calcium which makes them visible on X-ray. An ultrasound
might be indicated and urology consult if these things don't sort it out.