Let $\ A\ $ be an arbitrary set. Let $\ |A|>1\ $ (to avoid triviality). Let each of the functions $\ f_k:A^{\{1\ 2\ 3\}}\to A\ $ depend on all three arguments for $\ k=1\ 2\ 3,\ $ while each of the functions $\ g_k:A^{\{1\ 2\ 3\}}\to A\ $ does not depend on $k$-th variable, for each $\ k=1\ 2\ 3.$
I'll explain "dependent/independent" at the end of this note. It'll be preceded by "diagonal product $\ \triangle\ $ of functions (here, of three of them).
Assume also that
$$ f:=f_1\triangle f_2\triangle f_3\ \ \text{and} \ \ g:=f_1\triangle f_2\triangle f_3\, :\,A^3\to A^3 $$ are inverse one to another. There are (historic) examples when $\ A\ $ is countable or of cardinality continuum, and for all infinite cardinals except, possibly, for the weird ones. There are examples (by analogy) whenever $\ |A|\ $ is finite and odd; there should be some examples when $|A|$ is not a power of $2$, but -- I conjecture -- never when it is:
..............................................................
CONJECTURE: cardinality $\ |A|, $ when it's finite, is not a (non-trivial) power of $\ 2\ $ (is different from $\ 2^k\ $ for any natural $k=1\ 2\ \ldots$).
-----------------------------------------------------------
EXAMPLES:
Let $\ A = \Bbb Q\ $ or $\ \Bbb R\ $ or $\ \Bbb Z_n\ $ for arbitrary odd $\ n>1.\ $ Define:
$\ f_1(a\ b\ c)\ :=\ b+c-a $
$\ f_2(a\ b\ c)\ :=\ a+c-b $
$\ f_2(a\ b\ c)\ :=\ a+b-c $
and
$\ g_1(a\ b\ c)\ :=\ \frac{b+c}2 $
$\ g_2(a\ b\ c)\ :=\ \frac{a+c}2 $
$\ g_2(a\ b\ c)\ :=\ \frac{a+b}2 $
Then, let $\ f\ $ and $\ g\ $ be defined as above. This establishes the odd cardinality case.
Remark: Every finite abelian group $\ X\ $ of odd order ($\ |X|\, $ -- odd) will do in place of $\ Z_n\,$ (with odd $n$).
The finite even cardinalities different from $\ 2^n\ (n\in\Bbb N),\ $ present a mixed story in an analogy to other combinatorial themes which admit exotic examples. This would be the complementary conjecture -- the mixed picture.
-----------------------------------------------------------
Diagonal product of functions (or morphisms)
Consider set $\ X\ $ and sets $\ Y_q\ $ and functions $\ f_q:X\to Y_q\ (q\in Q).\ $ Then, the diagonal product $\ f:=\triangle_{q\in Q} f_q :X\to\prod_{q\in Q} Y_q\ $ is given by:
$$ \forall_{q\in Q}\quad \pi_q\circ f\ := f_q $$ i.e. $$ \forall_{q\in Q}\,\forall_{x\in X}\quad (f(x))(q)\ := f_q(x) $$
-----------------------------------------------------------
Dependent / independent
Let $X\ Y\ T\ $ be arbitrary sets, and $\ s\in T.\ $ Elements $\ x\in X^T\ $ are functions $\ x: T\to X$.
A function $\ f:X^T\to Y\ $ does not depend on (is independent of) variable $\ s\ \Leftarrow:\Rightarrow$
$$ \exists_{f_s\in X^{T\setminus\{s\}}}\,\forall_{x\in X^T}\quad f(x)=f_s(x|T\setminus\{s\}) $$
Otherwise, $\ f\ $ depends on variable $\ s,\ $ i.e.
$$ \exists_{w\ x\,\in\,X^T}\ \ (\, w|T\!\setminus\!\{s\}\,=\, x|T\!\setminus\!\{s\}\quad\text{and}\quad f(w)\ne f(x) \,) $$
====================================
PS. In the style of Q&A, I've provided only the special case of the general question about the number of independent variables of a function and its inverse, $\ f\ $ and $\ g.\ $ Actually, we want to know the whole structure of sets of independent variables for $\ f\ $ and $\ g.\ $ This question is as fundamental as it goes, hence it belongs to the theory of the Foundations of Mathematics. (Please, someone reattach the related tag to my question).