A long time ago, I booked a room for my dad. At checkin, he gave the clerk his AA number. For my next 4 stays, the 500 double-dip miles went to his AA account. So, I guess the names don't have to match.
Granted, this was a few years ago, before all the double-dip options. Now, I find it's best to stick with points-and-points, so it wouldn't matter anyway.