Given that the wheel spacing on my friend's old MTB is 130mm, would I be able to let him borrow the wheel off my commuter bike for a race. My commuter is a vintage 1995 8spd hardtail but the wheel is 1 year old and has an 8spd cassette on it. Would he be able to say use an extra spacer just to mount his 7spd cassette to my wheel and have it shift right?

Don't even waist your time swapping cassettes( even though a worn cassette that is worn differently than the chain that was on that cassette could cause problems) I say just throw your wheel on there with the 8speed cassette and adjust the derailure to shift on the 8 speed cassette only using 7 gears of it.