I know I'm not 'non-elite' as well but I'll take a stab at this.
It's the person with the highest frequent flier status.
If both have same status then it goes by who's name was entered first.
If the flight is cancelled, the person on the reward ticket won't be booked in W class but will be in Y class since there is only 1 seat left. And I suspect with only one seat left it is J class. Therefore the gate agent would have booked them in J class. Since both are now booked in J there is no way to tell what their original fare basis was. Therefore, the person will the highest status will be at the top of the list. And even though they are from another parter, if he/she is Star Gold/Silver...front of the line.
Cheers