Don't know your sex
or age but in either situation, if you are passing blood per your urethra and then pass urine
, you have a problem that needs evaluation.
One could have an infections, a tumor (malignant or benign), or some other inflammatory process in the urinary tract. It must be established as to cause. Please see your pcp or a urologist and get examined and some testing. Very important!