Any wifi equipped computer can do this if the mode you have the wifi in is what's labelled as 'infrastructure'.
ie. you can set up two machines with wifi to communicate to each other without any access points nearby.
Maybe she was confusing that with a previous experience of a mac in that mode.
Uhm... I think you are confused a bit on this... First, the mode you are thinking about is "Ad-Hoc", which Apple calls "Computer-to-Computer" networking. Infrastructure is when you have the access point hooked up to the physical network, and computers connect to it.
Secondly, I find it a bit far fetched that this scenario would exist. Ad-Hoc is /very/ rarely used. I have tried Ad-Hoc /once/ in the past 6-7 years. A simpler, and more plausible explination would be that this teacher (like many who claim to know enough about technology to teach it), doesn't know what the fark wireless actually is, or that Mac wireless hardware is the same stuff found everywhere else.
I mean, this sort of thing reminds me of a networking teacher I had in college. I think I showed her up one too many times in class, because I got my final grade back at a D-, when the calculated grade (based on her own formula) should have been a B-/C+... and even then it was only that low because not showing work on how you got an IP address + net mask would get you a zero on the whole assignment.