Is it allowed for functional equations to solve them by saying let $f(x) = g(x) + h(x)$ for some functions $h$ and $g$, and then finding $h$ and $g$ to find $f$? E.g. let $f(x) = x^2 + g(x)$, and then finding $g$ to find $f$.
I'm terrible at functional equations, so I'm sorry if this is a stupid question
The short answer is yes. Just be careful that the definitions are sound. For example, the domains must match. If $f$ was supposed to be a function defined on $\mathbb R$, you can't say $f(x) = 1/x + g(x)$, because that doesn't make sense for $x = 0$, so what is $g(0)$?
It is usually better to set this out as introducing a new function. You are the one defining it, and so it is your responsibility to verify that the definition is sensible. So say it like this (with your example):
[Then proceed to deduce that, say, $g(x) = x$ for all $x \in {\mathbb R}$.]
The difficult part here would be the omitted deduction that $g(x) = x$. The functional equation might look simpler when expressed in terms of $g$, but that alone rarely solves it. The key is that "finding $g$" should not mean "find/guess one possible $g$", but find all possible $g$ and prove that there are no others.