Thank you for asking your query at DoctorSpring. Sorry to hear about your health problem. I will try my best to help you.
The most probable reason for your symptoms is a congested prostate (due to prostatitis - infection of prostate).
You will be knowing that semen and urine pass through the same anatomical tube. On the way of it there is a structure called prostate which produces 2/3 of the semen. During erection the prostate become slightly bigger. And during ejaculation it releases semen (a part of it actually). This prostate is situated near to the Urinary bladder. In normal cases it won’t cause any problems, but when there is a CONGESTED prostate the prostate is already bulged up. During erection it bulges up further and put pressure on the urinary bladder and causes feel to urinate. So this will result in feeling of urination while having an erection.
This could be happening in your case.
The cause for congestion is mostly infection. It could be the infection in the prostate which causes the yellowish colour of the semen. The problem here is that routine urine and blood tests cannot accurately detect this kind of infection. These need special tests including prostatic massage and sampling. Also the antibiotics need to be taken for a longer periods (months.) So I would recommend you to consult an UROLOGIST and begin treatment as soon as possible.
There are other possibilities like an abnormality in the passage or a weak sphincter that can cause similar problems. But it’s rare and need to be considered after ruling out infection. Your Urologist can help you in this.
Hope this helps