blood in your urine is usually a sign of a urinary tract infection, and the last few weeks of pregnancy can get extremely uncomfortable as bub is pushing on all your internal organs etc and your ligaments are softening and getting ready for birth
It's hard to say what is going on, and you are taking the best course of action in seeing your Dr. If the pain persists or worsens (or, if you have not made your Dr. aware of it), don't hesitate to go to L&D. It is always better to be safe then sorry. This is one of those situations where I think offering suggestions might be counterproductive as I don't want to deter you from going in, so please do not take anything I suggest as a diagnosis ok?
Traces of blood in urine are sometimes indicative of a UTI. Did your Dr. do a urine test? Did he say it was in the actual urine? If it's light vaginal bleeding, it is also possible it is your mucus plug beginning to come apart, but that wouldn't show up as blood in the actual urine itself.
The pain in closing your legs, etc. is possibly due to babies positioning and dropping/head engaging. If you have not discussed this with your Dr., you do need to call him/her or go to L&D. Best of luck to you.