flux in Real vs. ideal transformer
Flux in a real transformer doesn't equal zero. That flux is called the magnetization flux and is solely due to the primary winding being excited by a voltage. So, the current that flows into the primary when the secondary is open circuit is the same as the current that flows into a simple inductor that has the same inductance as the primary winding. That current is called the magnetization current and it produces magnetization or magnetic flux.

Therefore, given that the primary doesn't have infinite inductance, there is a magnetization current. This current is 90 degree lagging the primary voltage because, it's an inductor. This current can cause significant core saturation.

Now, if you loaded the secondary with a resistor you would take secondary current and there would be a corresponding current taken by the primary in addition to the primary magnetization current. The primary load current (due to secondary current through the resistor) would be in phase with the primary voltage and is of course, quite different to the magnetization current because magnetization current lags by 90 degrees.

The primary current (due to the load on the secondary) has exactly the opposite number of ampere-turns as the load current in the secondary and hence, neither add-to nor subtract-from the magnetization flux in the core. In addition, load currents do not produce saturation in the core.