I assume that example.com would use its own version of said module, but I don't know. I have the same question regarding themes.
The sites/site.com/modules will be used over anything in sites/all/modules.
There's a really good description of how it works on Acquia:
Site-specific modules and themes
Each site in a multi-site install contains at least a
/filesdirectory. But each multi-site directory can contain modules and themes too - and any modules or themes in those directories will only be available to that site.
For example, imagine I have two sites, example.com and example2.com:
/sites/all/modules/contribcontains all of the community contributed modules that I want both sites to share. For example, Views might live there.
/sites/all/modules/customcontains all of my custom modules, written specifically for my Drupal installation.
/sites/example2.com/themescontains any themes you want to only be available on example2.com.
/sites/example2.com/modulescontains any modules you want to only be available on example2.com.
When Drupal looks for available themes and modules, it searches in the following order:
So, when I write my custom theme for example2.com, I can put it into the example2.com multi-site directory:
And the "Chicken" theme will only be available to users of example2.com. Users of example2.com will still have access to all of the themes in /sites/all and /themes, but example.com won't be able to see the "Chicken" theme at all.