His resignation does not have to be accepted (and Her Majesty's consent is required for such termination) but it is generally held that an Commissioned officer should be permitted to resign their Commission unless special circumstances apply.
Of course, I should add to this that when I threatened to resign my Commission in a fit of pique at the age of about 22, I was informed by my immediate superior that if I tried it, he'd kick me so hard, my arse would be above my eyebrows. Once he had my attention, I was treated to a very impressive instantaneous lecture of the responsibilities of a Commission and not treating it as if it was just another job. I was in full agreement after five minutes, though the lecture went on for at least fifty.