This question isn't as straightforward as it seems. The answer really depends on the contents of the custom ROM zip (assuming it comes in zip format) that you're trying to flash.
Most custom ROMs are not provided as image files. While almost all custom ROM zips include a boot.img which includes the kernel and is fastboot flashable, the system portion is where you run into an issue without a custom recovery. Stock-based custom ROMs typically include system files in a folder, which a custom recovery (like TWRP) will then extract to the system partition of the device. There is no way to complete that operation via fastboot. In order to flash such a system using fastboot, you would have to create an empty image based on the size of your system partition, format it using the expected filesystem for your device, loop mount it to a folder (if using a Linux system - in Windows you may have trouble finding a tool to do this, though OSFMount may work), and then copy the contents to that folder, so that they are included in the image. Once you unmount the image, you'll have a raw system image of the custom ROM that is flashable via fastboot. See an example of this process described here.
For AOSP-based custom ROMs, system files are typically included as a block-based full OTA dat (or dat.br) file. These can also be converted into an image file, using a tool like sdat2img for a dat file, and the same tool for a dat.br file, after using the Brotli tool to decompress it.
As you can see, while it is possible to flash a custom ROM without a custom recovery, it's certainly simpler to use one, especially since most custom ROM zips are built with the expectation that a custom recovery is how it will be installed.