Connect another mac as secondary display
No.
Unless explicitly mentioned in the official specifications for the machine, it can't.  For this machine it is https://support.apple.com/kb/sp649
You might find Synergy an interesting alternative as it allows you to use both machines at once.  https://symless.com/synergy