Thermodynamic equilibrium
Consider the time derivative
$$ \frac{dF}{dt}(a_1,...,a_p) = \frac{\partial F}{\partial a_1}\frac{da_1}{dt} + ... + \frac{\partial F}{\partial a_p}\frac{da_p}{dt} + \frac{\partial F}{\partial t} $$
In this case, $t$ is not an explicit parameter so $\partial F/\partial t=0$.
If $da_i/dt=0$ for all $i$ (system is in equilibrium) then $dF/dt=0$ for any $F$ with $\partial F/\partial t=0$.
If $dF/dt\equiv 0$ (i.e. zero for any $\{a_i\}$) then either $\partial F/\partial a_i=0$ for all $i$ (in which case you don't have a function of all of the $a_i$), or $da_i/dt=0$ for all $i$ (i.e. system is in equilibrium).
The values of the state functions can be computed when the system is in equilibrium only.
For example, consider a situation where an ideal gas isn't in equilibrium such that the pressures at different points in the container is different. How would you determine the pressure of the gas? You can't; the pressure isn't defined for the system.
The existence of a function $F$ which takes state parameters as inputs implies that the values of the state functions are well defined and can be related.
Consider the equation of state for an ideal gas:
$$PV = nRT$$
This equation of state is only applicable for a system at equilibrium.
In our previous example, the ideal gas isn't in equilibrium and the pressure of the system wasn't well defined. Therefore, the equation of state for an ideal gas is not applicable; or in other words, there isn't a value of P which can be substituted in the equation of state.
I just rethought my question and found an answer.
The function $F(a_1,...,a_p)$ has its zeros at such $a_1,...,a_p$ that the system is in thermodynamic equilibrium, by definition.
So even if I can find $a_1(t)$ and $a_2(t)$ such that $F(a_1(t),a_2(t),...,a_p)=0$ it just means that $\{(a_1(t),a_2(t),...,a_p)\,|\quad t\in \mathbb{R_+}\}$ is a set of points in phase space at which system is in equilibrium. In fact this set is a path of a quasistatic process as @Yashas pointed out. So even if there is a state with inconstant parameters for which equation F=0 holds in fact it is a process composed of succeeding equilibrium states.
So the 0th law says now: If systems $(A,B)$, $(B,C)$ and $(A,C)$ are described by functions $F_1(a_1,...,a_p;b_1,...,b_q)$, $F_2(b_1,...,b_q;c_1,...,c_r)$ and $F_3(a_1,...,a_p;c_1,...,c_r)$ respectively and $\{(a_1^*,...,a_p^*;b_1^*,...,b_q^*)\}$, $\{(b_1^*,...,b_q^*;c_1^*,...,c_r^*)\}$ are sets of zeros of $F_1$ and $F_2$ respectively, then $\{(a_1^*,...,a_p^*;c_1^*,...,c_r^*)\}$ is a set of zeros of $F_3$.
I would by glad if someone could audit this answer.