Would a Shimano or SRAM 7-speed hub be compatible with a modern SLX rear hub? Or would I need to get a special 7-speed hub?
They're not the same. The splines on a 7-speed hub are shorter than a newer 8/9/10-speed hub. As Brad said, you can put a 7-speed casssette on a 8/9/10-speed hub if you add a 4.5mm spacer under the cassette.
Goos reference: http://www.sheldonbrown.com/k7.html