Thanks for all the advice everyone. I'll have to come back and re-read all the legalese. Company Y called me out of the blue, it has nothing to do with my company XXX (but is similar work), and Company Y calls me every couple of years anyway, to see what I am doing.
Company Y would actually not be hiring me for project B but as a full time employee that could work on any project B C or D. Company Y may or may not be looking for sub contractors from company XXX from project B, C or D, so XXX probably wouldn't see it as losing an opportunity.
In my industry it's common for a company (like company y) to pay another company (ex. XXX) a penalty to release someone. But when I spoke to company Y they didn't seem open to that. If I went to XXX they would probably say "we don't want this business but we don't want you to have anything to do with it either, just get on with what we've already told you to do", as stated by another poster.
I don't think company Y will call me back because I don't have a certificate they want, but I was talking to company Z today which would be a similar situation.
You all are right that my reputation is extremely important. I literally have to sign things saying I am honest all the time. I could not care less about ethics, integrity (because companies shit on me all the time, but I generally abide by contracts if they are non-abusive), but if I were to turn down company Y on principle, they would probably be impressed. Then I can tell XXX about how great I am for following the non-compete (not now but when I leave). I think I will wait a year, get some good, desired experience, then find a company where I won't have to be a sub-contractor, wait another year, at which time Co. Y will come calling me again.