If you want part of a script to use Editor stuff, guard those lines with #if UNITY_EDITOR directives and they can live anywhere you like (well, probably not in Plugins).
I do that all the time, just to keep from splitting up stuff related to a simple small class into two files.
For instance:
That has some app-level values and also some editor-only code.