I think this is a silly question, but suppose that $X$ is a proper geometrically integral scheme over a (not necessarily algebraically closed) field $k$, is it true that $k$ is a subfield of $\mathcal{O}_X(U)$ for all $U$?
I think the answer is yes, in particular since $X$ proper, it is of finite type, separated, and universally closed over $k$, and so geometrically integral implies that $X$ is actually a proper variety over $k$. It follows that $H^0(X,\mathcal{O}_X)\cong \mathcal{O}_X(X)\cong k$. I claim the restriction maps $\theta^X_U:k\rightarrow \mathcal{O}_X(U)$ are injective. It suffices to suppose that $U$ is affine, so let $U=\operatorname{Spec}A$; since $X$ is of finite type over $k$, we have that $A\cong k[x_1,\dots,x_n]/I$, so the restriction map is given by $k\mapsto [k]\in k[x_1,\dots,x_n]$, which has to be injective as if $[k]=0$ it implies that $k\in I$ so $I=A$, and $\mathcal{O}_X(U)=\{0\}$ which can only be true if $U$ is empty.
Does this make sense?
Your argument is fine, but the conclusion holds with zero hypotheses. For any locally ringed space $f:X\to \operatorname{Spec} k$ and any nonempty open $U\subset X$, we have ring maps $k\to \mathcal{O}_X(X)\to\mathcal{O}_X(U)\to\mathcal{O}_{X,u}$, where the first map is global sections of $\mathcal{O}_{\operatorname{Spec} k} \to f_*\mathcal{O}_X$, the second map is the restriction map, and the third map is the restriction map to the stalk at some $u\in U$. Since $k$ has no nonzero proper ideals and $\mathcal{O}_{X,u}$ is a local ring with $1\neq 0$, we have that the composite map $k\to\mathcal{O}_{X,u}$ is injective, so the map $k\to\mathcal{O}_X(U)$ is injective too.