@kickycan,
I've made this switch a number of times, but never looked for any legal loopholes. In fact, I didn't look to make the switch at all. The company I was working with could also do the math, so they worked things out with the employment agency. Employment agencies routinely let temps out of their non-competes at the request of the employer, because that's good business for them. However, companies can also have legal, tax, and other reasons for preferring to work with freelancers through an employment agency, rather than directly. If the ad agency hasn't expressed an interested in working directly with you by now, it could be that this is because they don't want to. If they do, then they would be the ones to resolve this with the employment agency, not you.