It is not at all wrong to contact or discuss with anyone regarding your desires and interests for residency programs. In fact, you can openly tell anyone, in any manner, that you will rank them first. You cannot, however, engage in an agreement outside of the match. A program telling you that you are ranked to match (without strings attached) or vice versa is perfectly acceptable.
I would, however, wait to discuss rank lists with people until very late in the game, if ever. Your rank list will change 100 times by then.