Does the graph of a measurable function always have zero measure?

No. First, recall that the product measure is not unique for non-$\sigma$-finite spaces.

Let $(X,\mathscr{M},\mu)=(\mathbb{R},2^\mathbb{R},\#)$ and $f(x)=|x|$. We consider the product measure $$\nu(A)=\int_\mathbb{R}\#A^xdm(x)$$ where $A^x=\left\{y\in\mathbb{R}:(y,x)\in A\right\}$. Note that this is well-defined in the product $\sigma$-algebra of $X\times\mathbb{R}$ (for rectangles $A=E_1\times E_2$, where $E_1\subseteq\mathbb{R}$ and $E_2\subseteq\mathbb{R}$ is Borel, the map $x\mapsto\#A^x$ is simply $\#E_1\chi_{E_2}$).

It should be clear that $\nu(\operatorname{graph}(f))=\infty$.


In the non-$\sigma$-finite case you have to be careful with which "product measure" you mean, because they are not all equivalent. For example, let $X = [0,1]$ with counting measure $\mu$, $Y = [0,1]$ with Lebesgue measure and $f(x) = x$. The "minimal" product measure on $X \times Y$ gives the graph of $f$ measure $0$, because $\int_Y \chi_{\text{gr}(f)}(x,y)\; dm(y) = 0$ for all $x$, but the "maximal" product measure gives it measure $1$, because $\int_X \chi_{\text{gr}(f)}(x,y)\; d\mu(x) = 1$ for all $y$.