Is there a way to configure a MacBook Air running Lion (10.7.1) to recognize the internal keyboard as QWERTY, but to attach an external keyboard configured to use the Dvorak configuration?
No, only a single keyboard layout can be active at one time and it will apply to all keyboards. But switching layouts is very simple: Apple/Command + space. Or you can no doubt make it even simpler if you want.
Update 2016: It's possible now to do this with Karabiner, as described at
The common solution to this problem is to have the external keyboard emulate a standard layout (e.g. if you have an external Dvorak keyboard, it is seen as a Qwerty layout by the host OS). In the mechanical keyboard hobby community where keyboards are often programmable, this is the norm.