Let me assume that you are talking about a real-valued function $f : [a,b] \to \mathbb{R}$. A characterization of which such functions may be written as $f=g-h$ with $g$ and $h$ convex (so $-h$ concave) is known. The result is the following (see this book):
Let $f : [a,b] \to \mathbb{R}$. Then there exists $g$ and $h$ convex such that $f = g-h$ if and only if the derivative of $f$ is in the class $BV[a,b]$ of functions of bounded variation on $[a,b]$.
Here, "derivative" is in the sense that there exists a function $r \in BV[a,b]$ such that, for all $x \in [a,b]$,
$$
f(x)-f(a) = \int_a^x r
$$
Hence, the answer to your question is both yes and no. If you take an $f$ which is piecewise affine but has discontinuities, then you will not be able to find such a decomposition. Conversely, if it is continuous, then its derivative will be piecewise constant, so of bounded variation, so the above result applies.