In the US, all officers must be university grads. The enlisted ranks do not need a university degree to join. I would assume the same is true of enlisted ranks in the UK.
Technically you don't need a degree to be an officer in the UK: you only need A Levels (finish high school) to go to Sandhurst and begin officer training. In reality however something like 98% of Sandhurst applicants are university graduates. I don't know the exact percentage of entrants who don't have a degree though, so don't quote me. It has been a while.
P.s. as a famous example, I believe Prince Harry went to Sandhurst without going to university first.