Personally, I think the best method to deal with rubbing horses is to back them up. I've taught two of my horses not to rub on me this way.
Basically, when they start to rub on you or get too close, just back 'em up. They can't rub on you if they are out of your personal space. If you stand still and wiggle your rope (sometimes with vigor) the horse will back-up. It helps if you can back them up like this as opposed to pushing on them because horses tend to push back. The horse needs to learn not to come into your personal space unless invited. When you want to rub on them, invite them closer. If your persistent it will work. And.....it's great for your back-up.