No.
Your 2015 iMac is too new to support Target Display Mode – and even if it did, Apple added restrictions on the video source that mean that your MacBook Air is too new to use ANY iMac as a Target Display.
Reference: Use your iMac as a display with target display mode - Apple Support
Your 2015 iMac is too old to act as an AirPlay Receiver for AirPlay to Mac, a much lower-quality connection method.
Reference: Continuity features and requirements for Apple devices - Apple Support
There may be third-party applications that you can buy for the 2015 iMac that would let you AirPlay to it. Whether the results would be satisfactory for your purposes is something that I don't know. There may also be some other workaround products like Duet Display (a "subscription" program for which you have to keep paying every month) or Luna Display.