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.
P.s. as a famous example, I believe Prince Harry went to Sandhurst without going to university first.