"My lawyer will need to talk to your legal department, he charges $xxx per hour..." If you think I'm being snarky, I'm really not. Your entitled client is hoping to force you to, or let you, do something stupid so they can hang you out to dry or wring you out for free or discount labor, maybe even a "small guy like you should be willing to pay us for the oportunity to do this work".
I'm not saying to pretend you are a lawyer, I'm saying to get one, and if its all above-board, things will work-out. If it ends up a "missed opportunity", then it was never really an opportunity in the first place.
Maybe I'm just cynical, but I've always made double or triple the $$-per-hour as a contractor than I have as a W2. Some "clients", head-hunters, and would-be "lead-finding services" would try to interact with me as though being a contractor just meant I was jobless, which, maybe they would have been right, in a world where I had or made the time to interact with people set on wasting it like so...
Read that last sentence again; By entertaining their non-sense, their assumptions about how they can get-away with exploiting you become a self-fulfilling prophecy.
Hire a lawyer or become one. You can be out some money paying the lawyer(which becomes overhead expense to factor-into what money the client should owe you, in beautiful black-and-white contract/invoice form that let's you sleep at night), or you can be out time, near-infinite amounts of time, doing your client's homework on-top-of the programming they ostensibly are paying you for. Everything you care about suffers in the second version, including your code quality.