The main risk, say, as a Canadian, is if I visit a US-based client, then I can't be officially "working while in the US", but it's OK if I do it remotely.
I freelance for my local Canadian company, and if my company sends me to the US, then it's fine, because the client pays my company, who then pays me. The US company is not paying me directly.
I had a friend turned back because he said "the client pays me", when he actually meant "the client pays my company, and my company pays me" (he had an incorporated 1-person company, not freelancer).
When I was purely freelancer, I would say "I'm going to see a client, but it's only social, I'm not paid". Customs would frown, but let me pass. I've even had an agent argue "so you have nothing else to do on a weekday, and your work-friend either?" to which I said "yep, we're computer nerds", and he let me pass.