The key is the differentiation between "work" and "business". Imagine I'm a website designer, or a copy editor, or a software developer.
- If I come to country A learn about "my thing" -- eg at a conference -- or to meet other people who do what I do, and nobody pays me for that, that's business.
- If I come to country A and discuss the possibility of doing "my thing" for a client in country A, but no money is involved because it's a "sales meeting" -- that's business.
- If I come to country A and do some things for my employer in country B, who continues to pay me a regular salary back in country B -- that's business.
- If I come to country A and do "my thing" for a client in country A, who pays me personally for doing that, especially by the hour spent -- that's work
- If I come to country A and do "my thing" for a client in country A, who pays my employer in country B, who continues to pay me a regular salary back in country B -- that's probably business but don't count on my opinion
Notice that all of that can involve a laptop and someone local -- that's not what's relevant in whether something is permissible or not. Business is allowed on a business visa. While it is not allowed on a tourist visa, many countries have a single "visitor" visa that covers both business and tourism. Work is only allowed with a work visa or work permit.