As you are nearing term, the pregnant uterus
does compress the bladder again, and it is normal for you to feel these symptoms.
You would feel sensation of not being able to void urine completely , because of the pressure of the uterus.
Do not hold urine for long, due to slight numbness
of pelvic nerves in preparation for labour, you might feel sensation of voiding by the time the pressure really builds and you feel pain.
So keep going frequently to the washroom and voiding lesser amounts more frequently.
If the pain persists, talk to your obstetrician about it , to rule out infection or any other disease.