I believe this holds more generally—here is the attempt I propose. Consider a function $f \in W^{1,p}_{\mathrm{loc}}(\mathbf{R}^2)$ for some $p > 1$. Since the second variable is fixed in the problem, we can take $y = 1$ and define $F(x) = \int_0^1 f(x,t) \mathrm{d} t$, outside of some negligible subset in $\mathbf{R}$. The claim is that this function inherits from $f$ the property that $$ F \in W^{1,p}_{\mathrm{loc}}(\mathbf{R}),$$ from which the desired conclusion follows. Let $I \subset \mathbf{R}$ be a finite interval. Then $$\int_I \lvert F \rvert^p = \int_I \Big \lvert \int_0^1 f(x,t) \mathrm{d}t \Big\rvert^p \mathrm{d} x \leq \int_I \int_0^1 \lvert f(x,t) \rvert^p \mathrm{d} t \mathrm{d} x,$$ so that $F \in L_{\mathrm{loc}}^p(\mathbf{R})$. In the same vein, given $h \in \mathbf{R}$ let $\tau_h F: x \mapsto F(x-h)$. Then $$\int_I \lvert \tau_h F - F \rvert^p = \int_I \Big \lvert \int_0^1 f(x+h,t) - f(x,t) \mathrm{d} t \Big \rvert^p \mathrm{d} x \leq \int_I \int_0^1 \lvert f(x+h,t) - f(x,t) \rvert^p \mathrm{d} t \mathrm{d} x.$$ In other words, $$ \lvert \tau_h F - F \rvert_{L^p(I)} \leq \lvert \tau_{he_1}f - f \rvert_{L^p(I \times [0,1])},$$ where $\tau_{he_1}$ is the translate of $f$ in the direction of the standard basis vector $e_1 \in \mathbf{R}^2$. The characterisation of Sobolev functions in terms of difference quotients means that there is $C > 0$ so that $$ \lvert \tau_{he_1}f - f \rvert_{L^p(I \times [0,1])} \leq C h$$ for small enough $h$, which in turn implies that $F \in W^{1,p}_{\mathrm{loc}}(\mathbf{R})$.