Recent years have seen an increased interest in the use of helium for radiation therapy of cancer. Helium ions can be more precisely delivered to the tumour than protons or carbon ions, presently the only beams licensed for treatment, with a biological effectiveness between the two. The accelerator required for helium is considerably smaller than a standard carbon ion synchrotron. To exploit the potential of helium therapy and of other emerging particle therapy techniques, in the framework of the Next Ion Medical Machine Study (NIMMS) at CERN, the design of a compact synchrotron optimised for acceleration of proton and helium beams has been investigated. The synchrotron is based on a new magnet design, profits from a novel injector linac, and can provide both slow and fast extraction for conventional and FLASH therapy. Production of mini-beams, and operation with multiple ions for imaging and treatment are also considered. This accelerator is intended to become the main element of a facility devoted to a parallel programme of cancer research and treatment with proton and helium beams, to both cure patients and contribute to the assessment of helium beams as a new tool to fight cancer.