MacBooks that don't have a monitor connected via a Thunderbolt/HDMI connector will just go to sleep if you close the lid.
Will a Mac Mini run without a monitor attached?
Regardless, the Astropad devs have talked before about how Astropad works, and it doesn't pretend to be a monitor for various technical reasons. So I doubt it would work unless you have 2 iPads, set up one with Duet Display, and then use the other for Astropad to mirror that display.
Even so, that would be really slow. Plus monitors are cheap as chips these days. You can get a 17" monitor with 1280 x 1024 resolution for $45 on NewEgg if you just need a cheap screen to mirror.