Notation such as $a(t)$ is fine and well for some purposes but it tends to make
things more complicated when you want to average things over a distance.
Assuming the function from time $t$ to distance $x(t)$ is invertible,
the object in question has a unique acceleration at each point along its path.
You write $a(t(x))$ for the acceleration, but you can compose the two functions
in that expression into a single function $a_x$, where $a_x(x) = a(t(x)).$
If you also assume that the accelerated object has mass $m$,
then $ma_x(x)$ is the net force on the object at each point along its path.
In that case, the work done on the object in traveling from $x_0$ to $x_f$
is simply
$$\Delta E = \int_{x_0}^{x_f} ma_x(x)\, dx = m \int_{x_0}^{x_f} a_x(x)\, dx.$$
If we wanted to do the same amount of work on the object using
a constant force $F_{\mathrm const}$ at each point along that segment
(that is, using a constant acceleration $a_{\mathrm const} = \frac{F_{\mathrm const}}m$),
the work done would be
$$\Delta E = ma_{\mathrm const} (x_f - x_0) = ma_{\mathrm const} \Delta x.$$
Together, these equations imply that
$$ma_{\mathrm const} \Delta x = m \int_{x_0}^{x_f} a_x(x)\, dx.$$
For $m \neq 0$ and $\Delta x \neq 0,$
and writing $a_{\mathrm eff} = a_{\mathrm const}$ for the constant acceleration,
this is equivalent to your equation.
That is, as long as you can express the acceleration as a function of position
along the path, the $a_{\mathrm eff}$ in
$v_f^2 = v_0^2 + 2a_{\mathrm eff}\Delta x$
is acceleration averaged over distance.
More generally, it is not even necessary for $x(t)$ to be invertible,
as long as it is still possible to write the acceleration as a function of
distance $a_x(x)$ rather than time.
The function $a_x(x)$ then describes a conservative force field, and
the integral $\int a_x(x)\, dx$ measures the potential of this field at each point.
The formula
$$a_{\mathrm eff} = \frac{1}{\Delta x} \int_{x_0}^{x_f} a_x(x)\, dx$$
is still valid in that case, although it is not valid to write $a(t(x)).$
For example, you could initially set the object moving in the direction
opposite to the direction of acceleration, in which case (if the acceleration
continues to act in the same direction and continues to be strong enough,
though not necessarily constant), the object will eventually come to a stop
and then start traveling back to where it came from.
In that case the function $x(t)$ is definitely not invertible, but
$v_f^2 - v_0^2$ will still be determined by the locations (values of $x$)
at which $v_0$ and $v_f$ are measured.
Edit:
We can derive the potential of a force field without invoking mass at all.
The "force" field really is just a field of acceleration
vectors; these create force when you introduce an object with mass,
but the field potential is defined mathematically
even if the masses of objects are never mentioned.
Let $a$ be the acceleration at any given location
(the acceleration vector at that location as defined by the "force" field),
and let $v$ be the velocity of a particle acted upon by that acceleration.
As usual, $v = \frac{dx}{dt}$ and $a = \frac{dv}{dt}$.
Then
$$a = \frac{dv}{dt} = \frac{dv}{dx} \frac{dx}{dt} = v \frac{dv}{dx},$$
and
$$\int a\,dx = \int v \frac{dv}{dx} dx = \int v\, dv = \frac12 v^2.$$
Over a particular segment of the path from $x_0$ to $x_f$, the potential of the field
is converted into velocity according to the following equation obtained by
taking a definite integral of $a$ rather than an indefinite integral:
$$\frac12 v_f^2 - \frac12 v_0^2 = \int_{x_0}^{x_f} a\, dx.$$
If we then find the average acceleration with respect to distance,
$$a_{\mathrm avg} = \frac{1}{\Delta x} \int_{x_0}^{x_f} a\, dx,$$
where $\Delta x = x_f - x_0,$ then
$$v_f^2 = v_0^2 + 2a_{\mathrm avg} \Delta x.$$