MacBook Air: Close lid and lock features
No. What you want is not possible.

When the screen is closed the behavior is the same to the user as if it went into sleep from another reason such as pressing the power button. There isn't any way to have closing screen sleep (called clamshell sleep) set to have a different effect than any other kind of sleep through user-accessible preferences. If you have your mac set to require a password after waking in the security preferences then the mac will ask in both cases upon waking.

However, the mac internally codes the reasons for sleep differently. So the computer can tell clamshell from idle sleep, and also can tell if the mac went to sleep for another reason such as power button press, low power or high temperature. Therefore it is possible that a third party hack can use these codes to enable different behavior. I could not find one, though.

When the mac wakes up there are similar codes generated by the OS so that it knows if the computer was woken by opening the clamshell, wiggling the mouse, pressing the power button, waking for network access and so on. This seems to create another opening for a third party solution.