Well sure, if Brazil wants to build the Great Firewall of Brazil, they can do so.
Well sure, if Brazil wants to build the Great Firewall of Brazil, they can do so.
This happens all the time in every country.
Also, they don’t need a firewall, ISPs can block domain names (which the courts can force them to since they operate in the country) very easily and is used across the world.
Of course when a company is trying to do business in a country, it needs relationships with local companies, access to banking and payment infrastructure, etc... and governments can certainly prevent those from doing business with it. It doesn't sound like that's the issue here though.
If there is a mechanism by which the government of Brazil can force a company based in the USA or Canada to block visitors to its website, I would like to know the details so I can advocate that the USA withdraw from the relevant treaty. I'd apply the same logic to the USA trying to force foreign websites to shut down or block visitors from the USA.