Apple only provides downloads for a couple of versions of macOS installers from outside the App Store. macOS 10.11 El Capitan is the most recent OS that is worthwhile. macOS 10.13+ installers must all be downloaded as an Apple app from within the App Store which requires a Mac that is actually compatible with the installer you want to download.
If you need macOS 10.11, then yes, you can download the macOS 10.11 installer directly from Apple in .dmg form. Since this is just a standard macOS archive file, you can download it from any computer or OS and transfer it to a computer compatible with macOS 10.11. In order to use the contents of the downloaded macOS 10.11 .dmg file does require a Mac capable of running macOS 10.11 to extract. A link for the macOS 10.11 installer is available from the link that @mingoslkd provided.
If you want to archive a macOS 10.13+ installer, then that is possible, however, this still requires a Mac to download the installer in the first place. This allows you to store a macOS installer for later use if you have access to another Mac so that you can create a bootable macOS USB installer using a Mac that otherwise would be unable to download the installer from the App Store.