Sure! Using a second Mac download the proper macOS installer from here [https://support.apple.com/en-us/102662|How to download and install macOS] then setup a 32GB USB thumb drive first reformatting it for Mac, then copy over to it the OS installer package and following this [https://support.apple.com/en-us/101578|Create a bootable installer for macOS].
Then all you need to do is startup your MacBook Air with it to install the OS.