Cherenkov emission of extensive air showers (EAS) from cosmic gamma rays and cosmic-ray protons has been modelled. Spectral density of such emission in the 240-700 nm band has been determined for 3 GeV-10 TeV primaries of both sorts. It has been shown that the ratio of EAS Cherenkov emission fluxes in the optical and ultraviolet (UV) bands substantially depends on the sort of the primary, so the ratio can be employed to select gamma-ray events from the background produced by cosmic rays. Detection of EAS Cherenkov emission with specialized silicon photomultipliers sensitive in the UV band would allow one to substantially extend the duty cycle of a Cherenkov gamma-ray telescope, as it would be possible to observe the showers during moonlit nights. The UV-sensitive silicon photomultipliers developed at the Ioffe Institute would allow to detect gamma-ray-induced EAS at the Cherenkov gamma-ray observatory ALEGRO over a threshold of about 40 GeV at 5 km above sea level and about 80 GeV at 2 km above sea level.