-EAD is based on I-485, not I-140. So, technically, only if I-485 is denied, EAD will be invalid. After they appeal, or file MTR for their denied I-140, their I-485 will continue valid.
I still don't agree with you on this point. All I-485 and affiliated EAD and AP are based on a valid I-140. If I-140 is rejected, all derivatives will be invalid immediately, though there will be some delay if I-140 and I-485 were not filed concurrently. But still to be safe for your future benefit, you should stop using EAD as soon as you know the I-140 is denied.