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).



Cartesian dissimilarity of a function $\ f:A^3\to A^3\ $ and its inverse
$\newcommand{\F}{\mathbb{F}}$
Your conjecture is false, I will construct a counterexample for all powers of two $2^n$ with $n \ge 2$. 


Let us identify $A$ with $\F\_{2^n}$. An example from OP corresponding to the odd numbers, is a linear mapping. Our functions also would be linear. Let $G$ be a matrix constructed from the functions $g\_1, g\_2, g\_3$, as rows and $F$ be its inverse, constructed of the functions $f\_1, f\_2, f\_3$. Then we want the following things: matrix $G$ has zeroes on the diagonal and matrix $F$ does not have zero entries. If we start with the matrix $G$ with the zeroes on the diagonal then the elements of $F$ are product of some two elements of $G$, divided by the determinant. So as long as all non-diagonal elements of $G$ are non-zero and the determinant is non-zero we won. This can be achieved for all $n \ge 2$ by, for example, the following construction:


Let $a \in \F\_{2^n}$, $a\ne 0, 1$ and consider functions 


$$g\_3(x, y, z) = x + y,$$
$$g\_2(x, y, z) = x + z,$$
$$g\_1(x, y, z) = y + az.$$


then the functions $f$ are


$$f\_1(x, y, z) = \frac{1}{a+1}(ay-x+z),$$
$$f\_2(x, y, z) = \frac{1}{a+1}(-ay+az+x),$$
$$f\_3(x, y, z) = \frac{1}{a+1}(y+x-z).$$


Since $a\ne 1$ we have $a+1\ne 0$ (we are in the field of characteristic two) and so it is a working example.


For the case $N = 2^kM$, $M$ odd, $M > 1$ we can just copy $2^k$ times the construction for $M$ from the OP. It leaves only the cases $N = 1, 2$. For $N = 1$ there are obviously no solutions and for $N = 2$ one can simply bruteforce all the potential cases (as was done by Ycor in the comments while I was writing my answer).


**EDIT** here is a simpler construction which doesn't need finite fields but only modular arithmetics and work for all $m \ge 3$. We will work in $\mathbb{Z}/m\mathbb{Z}$. Consider $$g\_3(x, y, z) = x +y,$$ $$g\_2(x, y, z) = x + z,$$ $$g\_1(x, y, z) = y-2z.$$ Then the functions $f$ are


$$f\_1(x, y, z) = -z+2y+x,$$
$$f\_2(x, y, z) = 2z-2y-x,$$
$$f\_3(x, y, z) = z-y-x.$$


