Just in case someone strolls into this topic: I’ve checked this and no: you cannot export you contacts and include the company ids they are linked to. Other way around also doesn’t exist.
I’m faced with a similar situation today and Google Search sent me to this very topic.
I have an excel of contacts with an attribute that I want to add to those contacts’ company as an attribute of the company, and I have the email address of each contact, but not their company id, and that makes it not so straightforward using the import/export tools available in Brevo UI.