Yes, a company can be a partner or shareholder. A partnership agreement or memorandum in the case of the latter, will be beneficial to protect the company’s interests in that capacity.