It’s preprocessing condition, if parameter given to #if is flase or undefined then this portion of code to #endif won’t be compiled, it will behave like it does not exist. WITH_EDITOR is true (or rether defined) if you build module for editor build of the engine. It is required if editor APIs are used that are not avable during building non-editor/shipping version of module and would give you error during packaging.
Those preprocessing conditions allow to build diffrent versions of the code without modifying the files themselves, engine provides different preprocess varables you can use, as well as you can define your own.
If you trying to call function filtered by WITH_EDITOR that means this API is only avable for editor-only use