H-1B status is terminated once the H-1B employment relationship is ended. The fact that your employer fails to report the termination of the employment relationship does not mean you are still in a valid H-1B status. In this case, you are only in AOS status and you can work by using EAD. There should be no conflict.
In the second situation, if the lay-off will be effective in two months, then you may still keep a valid H-1B status; while, at the same time, you are working for employer B by using your EAD. Assuming that your job duties are substantially similar to the ones in your labor certification and your I-485 has been pending more than 180 days, you can work for a different employer on EAD. As for employer A, you are not in violation because your employment is authorized by a still valid H-1B. Personally (without conducting extensive legal research), I believe there is no conflict in this hypothetical case.