Thanks for your query,based on the facts that you have posted it appears that you have
noticed blood clot in urine twice during last three months when your penis is erected.
This is most likely to be due to increased blood flow to the entire penis including urethra
while erected and there is possibility of urethra being inflammed gicing tise to slight bleeding from inflammed urethra.
If you get it again please take broad spectrum antibiotics like Cefotaxime
along with anti inflammatory medication like Diclofenac
twice daily for couple of days.
Ensure to drink more water.