Employment Law Questions? Ask an Employment Lawyer.
If you were paid while you were not employed, then legally yes they can reverse payments that were direct deposited,. Even if they can't, you legally have to return the money or a court will force you to and will require you to pay interest from the date that they made the request for you to return the funds.
They can attempt to reverse the deposit, but the bank may resist that. Then they'd have to sue you.
The only time frame they have to worry about, in terms of responsibility, is the statute of limitations for suing for unjust enrichment, which is two years. Legally, you could argue waiver if you told them they were still paying you and they didn't take any steps to correct it for months and months.
Even then, courts have long held that you cannot keep money paid to you in error.