Yes - you can configure multiple IP addresses on the server and have foo.com and www.foo.com bind to different IP addresses.
As I understand common-or-garden SSL, the security is put in place before the Host: header is available, so the header cannot be used to to determine which certificate is appropriate. TLS avoids this issue, but I'm not sure how.