You already have defined $f_{X,Y}$ to be zero outside of a particular region $S:=\{(x,y) : g(x,y) \le 0\} \subseteq \mathbb{R}^2$. The marginal is just $\int_{-\infty}^\infty f_{X,Y}(x,y) \, dx$. Of course, the integrand is zero for a lot of values, but that doesn't make this integral invalid.
What you seem to be interested in is the smaller set $S_1 := \{x : \text{there exists $y$ such that $(x,y) \in S$}\}$. Then $\int_{-\infty}^\infty f_{X,Y}(x,y) \, dx = \int_{S_1} f_{X,Y}(x,y) \, dx$. You can think of $S_1$ as what you would get if you looked at the $x$-coordinates of points in $S$.
You can define $S_2$ analogously, and you would have $S \subseteq S_1 \times S_2$; the left-hand side is your original set in $\mathbb{R}^2$, and the right-hand side is the smallest rectangle that contains it.
Update:
I think you are asking for the relationship between the sets $\{x : f_{X,Y}(x,y) > 0 \text{ for some $y$}\}$ and $\{x : f_X(x) > 0\}$; the first set is the plausible set of possible $X$ values you could draw from the joint density, and the second set is the same but for the marginal density.
Since $f_X(x) = \int_{-\infty}^\infty f_{X,Y}(x,y) \, dy$, we have
$(f_X(x) > 0) \implies (f_{X,Y}(x,y) > 0 \text{ for some $y$})$." So
$$\{x : f_{X,Y}(x,y) > 0 \text{ for some $y$}\} \supseteq \{x : f_X(x) > 0\}.$$
However, the reverse inclusion need not hold. If for a specific value of $x$ there are only finitely many or countably many $y$ such that $f_{X,Y}(x,y) > 0$, then the integral $\int_{-\infty}^\infty f_{X,Y}(x,y) \, dy$ is zero.