If $f(cx, cy) = f(x, y)$ can we always find $g$ such that $g(\frac{x}{y}) = f(x, y)$?

Motivation: A differential equation $\frac{dy}{dx} = f(x, y)$ is said to be homogeneous if we can find $g$ such that $g(\frac{x}{y}) = f(x, y)$, which allows us to solve the equation using the substitution $v = \frac{x}{y}$. A necessary condition for the equation to be homogeneous is for $f$ to satisfy $f(x, y) = f(cx, cy)$ for all $c \in \mathbb{R}$. Is this also a sufficient condition?

Question: If $f: \mathbb{R}^2 \rightarrow \mathbb{R}$ is a continuous function satisfying the condition that $f(x, y) = f(cx, cy)$ for all $c \in \mathbb{R}$, does there necessarily exist a continuous function $g: \mathbb{R} \rightarrow \mathbb{R}$ such that $f(x, y) = g(\frac{x}{y})$?

Define $g(x)=f(x,1)$. Then $f(x,y)=f(x/y,1)=g(x/y)$.