At the end of this answer I have included quotations from Zemansky’s book to provide more context for your questions and my comments below.
However, another requirement is asked by the author for the definition
to make sense: the system and the surroundings must have different
temperature.
When you say “another requirement” I assume you are referring to the definition in (3) of the second quote.
The difference between the definition in (3) and the thermodynamic definition in the first quote, is (3) is a necessary but not sufficient condition for heat to occur because it doesn't address the opportunity for the transfer, whereas the additional requirement for a diathermic (non adiabatic) boundary in the first quote affords the opportunity for the transfer to occur.
So the first quote almost describes both the necessary and sufficient conditions for energy transfer by heat. I say almost because, in addition to a diathermic boundary, the process cannot occur so quickly such that there is not enough time for energy transfer by heat to occur during the process.
Now, what I do not understand is why should we require something like
that and also in which state should the system and the surroundings be
at different temperatures: the initial one or any intermediate one?
A temperature difference is required between the system and surroundings for all states (initial and intermediate) in order for there to be an opportunity of energy transfer by heat.
My only attempt at explaining this consists of assuming that the
requirement is also valid for any intermediate state...
If by "this" you mean a temperature difference being a necessary condition for energy transfer by heat, then yes it is valid for any intermediate state, keeping in mind it may not be a sufficient condition as previously discussed.
...and that if the temperature were to be the same for the system and
the surroundings at each state in the process, then it would be like
the process were an adiabatic one...
If you mean exactly the same temperature, so that by definition no heat is possible, then yes. However, if there is an infinitesimal temperature difference maintained all during the process, as in a theoretical reversible isothermal process, then there would be heat transfer, so the process would not be considered adiabatic.
...because replacing the diathermic walls with adiabatic ones would
not change the nature of the process (the system and the surroundings
are always in equilibrium).
The only closed system process where you can have diathermic walls with the system and surroundings always being in thermal equilibrium is the theoretical reversible isothermal process discussed above. Replacing the diathermic walls with adiabatic ones will change the nature of the process.
Hope this helps.
QUOTES FROM 9TH ED, CHAPT 4, HEAT AND THERMODYNAMICS:
"Therefore we give the following as our thermodynamic definition of heat: When a closed system whose surroundings are at a different temperature and on which diathermic work may be done undergoes a process, then the energy transferred by non mechanical means, equal to the difference between the change in internal energy and the diathermic work, is called heat."
Several sentences later-
"It should be emphasized that the mathematical formulation of the first law contains three related ideas: (1)the existence of an internal-energy function; (2) the principle of the conservation of energy; (3) the definition of heat as energy in transit by virtue of a temperature difference."