Doesn't the isothermal irreversible expansion/compression of an ideal gas law violate the ideal gas law?
The ideal gas law describes the behavior of an ideal gas exclusively for thermodynamic equilibrium states.  During an irreversible expansion or compression, the gas passes through non-thermodynamic-equilibrium states, except at the very beginning and at the very end.  In these irreversible non-equilibrium states, the ideal gas law does not correctly describe the gas behavior.  For rapid expansions and compressions, the force that the gas exerts on the piston depends not only on the gas volume, but also on the rate of change of gas volume.  So yes, in irreversible/expansion of an ideal gas, the ideal gas law is violated.

That said, if we can control the force between the gas and the piston by some external means (say by using an automatic control system in conjunction with a flush mounted pressure transducer in the inner piston face), we can calculate the amount of work that the gas does on the piston (without trying to resort to the ideal gas law) even for an irreversible expansion/compression.  This then would enable us to use the first law of thermodynamics to calculate the final state of the gas (at least for an adiabatic process).