Total power conservation in transformer
The equation is for an ideal transformer.

The efficiency of a transformer is defined as the ratio of the output power to the output power plus the losses. The losses depend on the transformer application circuit. For example, a heavily loaded transformer will have more loss due to the winding resistance.

The coupling coefficient does appear in the efficiency calculation, so yes it is relevant. However, the coupling coefficient is often translated to 'leakage inductance'. There is a straightforward calculation to translate coupling coefficient into leakage inductance.

See the Radiotron Designer's Handbook Fourth Edition page 204 to 206 for how to calculate transformer efficiency accounting for leakage inductance and other losses.