The scenario you've described seems to imply that the company doesn't already know everyone's salaries. Pay transparency isn't what kept the company from giving her a raise; in fact, without pay transparency they could have told her that she was making more than her coworkers.
Point being that companies can already refuse to give a raise by saying some boilerplate like "you're being competitively compensated for an employee of your seniority, and unfortunately we can't give you a raise."