Does an office or office building where people work during the day and go home at night need a mezuzah?
No. And therefore one should not be put up. The only places that need Mezuzot are when people live there. For example if you have a restaurant where the owner lives upstairs, then the restaurant would have a Mezuza too.
What if you are renting a house from a non Jew?
A home needs a Mezuzah, no matter whom you’re renting from.
Let me clarify about the office mezuzah question. If the office is part of a home, even if it’s a separate section in the home, but there’s access back and forth, you may need a mezuzah.
The typical office, store, or Synagogue that does not connect to a home should not have a mezuzah.