You would qualify for a waiver on form I-601 if you can show extreme hardship to your USC spouse. Best recommendation is to contact an immigration lawyer to assist you with the waiver.
Best of luck.
Verdin Law Firm, LLC
Ten year ban is because you stayed unlawfully for more than one year and then left.
Only if you can show EXTREME hardship to your US citizen relative would you be allowed back to US as an immigrant.
This is to answer your added question. You were illegal because you did not hold legal immigration status while you were in USA. In other word, you violated immigration law. You may hold other permit, but if you don't have legal immigration status, those could be void or revoked.
You definitely should contact an immigration attorney for your situation.