The short answer is no, not necessarily.
Versions of Xcode, like any software, will have a minimum version of the operating system it requires to run. However, that isn't necessarily the latest version of the OS.
- Xcode 9.2 requires as a minimum macOS Sierra 10.12.6 to run
- Xcode 9.3 requires as a minimum macOS High Sierra 10.13.2 to run
This highlights the crux of the assumption in your question - that you need the latest version of Xcode to develop and publish apps. However, this assumption is false. Developers do not have to use the latest version of Xcode to develop and publish apps to the Mac or iOS App Stores. In fact, you don't necessarily have to use Xcode at all.
Having said all that, the latest release version of Xcode (9.4.1) requires macOS High Sierra 10.13.2 to run, so in that sense it does require the latest major version of macOS (although not the latest minor version). But, as I said, you don't need to use the latest version of Xcode to develop/publish an app.