We present the first X-ray detections of ultracool dwarfs (UCDs) from the first all-sky survey of the extended ROentgen Survey with an Imaging Telescope Array (eROSITA) onboard the Russian Spektrum-Roentgen-Gamma (SRG) mission. We use three publicly available input catalogs of spectroscopically confirmed UCDs and Gaia-selected UCD candidates that together comprise nearly 20000 objects. We first extracted all X-ray sources from the catalog of the first eROSITA survey, eRASS1, that have a UCD or candidate within three times their positional uncertainty. Then we examined all Gaia objects in the vicinity of these 96 X-ray sources and we associated them to the most plausible counterpart on the basis of their spatial separation to the X-ray position and their multiwavelength properties. This way we find 40 UCDs that have a secure identification with an X-ray source and 18 plausible UCD X-ray emitters. Twenty-one of these X-ray emitting UCDs have a spectroscopic confirmation, while the others have been selected based on Gaia photometry and we computed spectral types from the G-J color. The spectral types of the X-ray emitting UCDs and candidates range between M5 and M9, and the distances range from 3.5 to 190 pc. The majority of the UCDs from the eRASS1 sample show a ratio of X-ray to bolometric luminosity well above the canonical saturation limit of log (Lx/Lbol) ~ -3. For the two most extreme outliers, we showed through an analysis of the eRASS1 light curve that these high values are due to flaring activity. The X-ray spectra of the two brightest objects both reveal an emission-measure weighted plasma temperature of kT ~ 0.75 keV. These observations demonstrate the potential of eROSITA for advancing our knowledge on the faint coronal X-ray emission from UCDs by building statistical samples for which the average X-ray brightness, flares, and coronal temperatures can be derived.