no. blood from an ulcer would only be detected in gastrointestinal tract not the urinary tract. if you have blood in your urine the source is in the urinary tract and should be promptly investigated.
can you have blood in your urine if you have an ulcer