Could this be a UTI?

A
I've never had a UTI, so I'm not sure if this is what I'm experiencing. The last few weeks I've woken up very early (like 3-4am) with the urge to pee, and after I use the bathroom, it doesn't go away. I try to go back to bed but it's just too uncomfortable. 
This has only happened a few times, and it's not consistent. It doesn't burn or hurt when I pee, it just feels like I still need to pee after for a couple of hours, then it goes away. 
Could this be a UTI? Or something else?