IR35 only applies when there's an intermediary -- usually when you're providing services via a limited company, then taking dividends at the lower tax/NI rate instead of a salary.
If you're self-employed and contracting with a foreign company, then IR35 can't apply (or so I was told when I spoke to HMRC to ask precisely this question).
Now, HMRC could decide that it's not a true self-employment relation. In my case (self-employed, working remotely for a company in the US, limited degree of control by engager, purchasing my own equipment, bearing the risk of invoices not being paid) I think there are enough factors to make it a true self-employment relationship and HMRC's online questionnaire agrees.
Even if you were contracting through a limited company, if you met the self-employment test you'd probably meet the IR35 test when operating through a Ltd. I'd prefer not to risk it -- which is why I went the self-employment route.
I guess that makes senses now thinking about it. I really hate IR35, there's so much grey area.
For more information, and where to find a good lawyer who can firm up such a contract, try http://www.contractoruk.com/ir35/
While I have no familiarity, I doubt it is legal in many other countries with a socialist state that requires employers to pay things like national insurance.
Basically if you walk like an employee, and talk like an employee, you're an employee and shouldn't pretend to be an independent contractor and you probably should not set up your own company as you'll be double hit with taxes if they catch you (company taxes for employees and standard employee taxes). That could leave you with several years worth of some serious taxes to back pay.
Don't want to be doom and gloom, but be aware what you're getting yourself into if you're going to pretend to be a consultant/contractor when you're not.