does this mean company as in the people (friends/visitors) you're with (we have company coming for dinner or like the expression you're known for the company you keep) or company as in a firm, a business?
Can it mean either as in English?
Yes, it can mean either. Russian also uses the word "firm" (фирма), which, I think, is not as commonly used in English (am I right?)
Yes, you are right. A legal firm - адвокатская контора - is perhaps the only common use of "firm" in this sense.
Firm is used more often in British English than American English -- we pretty much only use it for "law firm."
real estate firms, brokerage firms etc. It has it's uses in America.
'Firm' is commonly used in Australia. E.g. Many firms have a dress code. Or, My firm is moving to a new location. In fact, I was surprised when Duo rejected it as an alternative for 'company'.
Russian "company" has different meanings, same as the English word. Фирма is a word, too—with a narrower meaning.
Could one say
"В хорошая компания."
In the English sense of [Being] in good company? As in with people. Would that make sense to say in group whilst having a good time?
Team - команда. По-моему, "good company" чаще всего встречается или в сочетаниях типа "I am in good company" - "Я в хорошей компании" (мне нравятся люди, с которыми я оказался вместе, в одной компании), или же "Google is a good company to work for" - "Гугл - хорошая компания для работы". Ни в том, ни в другом примере "team" не годится совершенно.