I'm not sure quite how you used 500s to upgrade someone you weren't traveling with, but the rules say you cannot do it. They also say you can only upgrade 1 companion on the same flight with you.
"Companions: Certificate is non-transferable, but may be used to upgrade one traveling companion to the same class of service following the same guidelines. Companion must be traveling on same flight as certificate holder. Additional upgrade certificate(s) will be required."
Link to the rules:
http://www.united.com/page/article/1,,50027,00.html
I'd say the agent was right in this case. Somebody did you a favor when you did it in the past.