The argument given for $du = Tds-Pdv$ being applicable to irreversible processes too (even though it was derived using dQ = TdS for a reversible process, from Clausius' inequality. For a non reversible process it would be dQ<TdS) is that the equation is expressed in terms of intensive thermodynamic properties and so the process path doesn't matter since it's all state functions.
Does this mean that work and heat transfer, per unit mass, are both independent of path? i.e if it's being stated that the Pdv term is state dependant(since it's a combination of intensive thermodynamic properties), isn't that saying that the work per unit mass, which is also Pdv, is path independent
Some additional background: The source of the confusion was the statement made at 4:50 in the lecture here. Which was that since the relation contains intensive properties only, it's not dependant on path and is always valid. So I thought that if any relation involving only intensive properties is path independant, maybe so should work per unit mass = Pdv (v = specific volume)
This has been clarified in the bottom note in chemomechanics' answer (the accepted answer).