This is already a concern with regards to other forms of trade, such as export restrictions where the US prohibits companies from doing business with Iran and North Korea.
Also note that country A absolutely can decide what terms upon which company B is allowed to operate in country A. This is true even of them stating what company B can and can't do in country C. If company B wants to do something in country C that company A prohibits, company B needs to decide whether it wants to operate in country A and follow country A's laws, or leave country A so it can do what it wants in country C.
The Internet is by design, and should be, decentralized. The "lowest common denominator" effect is an unfortunate side effect of centralized entities like Google trying to cater to everyone. But Google is the problem, exempting them from the law is hardly the solution. Smaller, localized providers will be able to better meet the needs of a given population's culture and laws, and address the unique problems associated with any given locality.
Yes, that does mean that the Internet won't look the same to everyone everywhere in the world, but that isn't a bad thing. Facebook in Myanmar is a great example that just because a website can be available globally doesn't mean it should. These global entities are not capable of understanding the impact they have on a macro or micro scale on that scope.