hi there, blood in urine indicates injury or infection any where along the urinary tract
starting from the kidney to the urethra
. As your pelvicalycial system is dilated along with right ureter
fullness it indicates obstruction at the level of ureter most probably due to stone or stricture.Some amount of urinary retention
is acceptable in the 2nd trimester as the uterus is pressing on the bladder and hinders in complete evacuation. The dilatation of the ureter and the pelvicalyx should be taken care of . As you are 27 weeks pregnant, you may take the advise of a urologist
whether it can be taken care of now or you need to wait. Usually 2nd trimester is a good time for any surgical intervention if requried but at your stage the attending urologist will be the best judge along with your obstretician. Take care.