Did blood come out from the prepuce (foreskin), or the penile aperture (the hole from where semen and urine come out)?
Its uncommon for a bleed to happen while maintaining an erection, especially when you're using a condom (friction injuries are ruled out).
Next Steps
I would advise you to consult a urologist for further management