(The previous version of this answer was criticized as being too over-the-top which was not intended, so I have reorganized it for more clarity.)
The key point here is keep your manager in the loop.
From your description, it appears that your company is a customer of the other company. Check with your manager if there are any issues with contacting the other company's employees directly for official purposes. If there are none, then just inform him that you would be using personal contact to help with the client's requests. If there are, then no matter how silly it is in practice, you will have to do what the manager says.
A simple request like asking for contact information is usually not an issue, but it is a good idea to keep your manager in the loop, so that he can deal with any potential problems, such as:
Violation of Contract: Your company's contract with the other company may have specified a SLA (service-level agreement) or other communication protocol to be followed for all communication. While unofficial channels are usually much more efficient to get the work done, violation of a contract is usually a lot of trouble to deal with.
Unreliable communication: It is a huge risk to your client's project if the only interface with the other company is you and your friend. Their project could slow down to a crawl or even grind to a halt if either of you is unavailable. Since the work is getting done and clients are not complaining, your manager probably doesn't know (or care enough) at this point how the work is getting done. By letting your manager know that you are using unofficial contacts, you give him a chance to plan for such situations.
Bypassing metrics: Management loves to track "metrics", especially in deals with other companies. Using personal contacts prevents them from getting the metrics they might be interested in. During an audit or at the end of the project, they might be "pleasantly surprised" to know that they have raised zero issues with the other company, which is misleading.
Dealing with problems: It is possible that your friend could give you wrong contact information, or that the contact suggested by him creates some issues for the client. Dealing with client complaints are a part of manager's job, but they cannot do it effectively if they have no idea what is going on.
The actual answer ends above. The below fluff additional commentary is only for entertainment information. It is based on my real work experience (and not taken from an HR handbook), and may not apply to every situation.
Many companies prohibit their employees from contacting employees of client/vendor companies directly, for a number of reasons:
Avoid bypassing management's priorities: When requirements come through the official communication channels, it is easier for management to prioritize the tasks. Every customer wants their issue to be given the highest priority, but nothing will get done when everything is urgent. Management assigns priority to prevent such chaos. By contacting the lower level employees directly, you bypass the management, which can create problems.
Avoid perception of preferential treatment: Allowing personal contacts for communication means companies that do not have such personal contacts in the company will have to wait longer or get inferior service. Even if that is not true, the company's other customers will carry that perception if they find out about this personal contact arrangement.
Official contacts are well trained for the job: Why do companies send spokespersons to press conferences instead of any random employee? How do these spokespersons respond "no comment" without batting an eyelid to controversial questions? Representing your company to outsiders is serious business, for which the company trains them thoroughly.
When things go well, using personal contacts instead of the official channels doesn't do any harm, but when things are not so rosy, such personal contacts can create problems for the company. What happens when the personal contact doesn't give you the required information, or gives the wrong information? What if you say something rude which damages your company's relationship with the other company?
Prevent accidental divulgence of confidential information: Personal contacts in companies have varying levels of awareness of corporate policies. A somewhat naive employee could unintentionally divulge company confidential information to outsiders.