Let $U, V$ be two affine open subsets of a scheme $X$ (Noetherian, over an algebraically closed field of characteristic $0$) and assume that $U \cap V$ is also affine.
Is it true that the map $\mathcal O_X (U) \to \mathcal O_X (U \cap V)$ is injective?
It seems intuitive, since any "function" defined on $U$ is also defined on $U \cap V$, but I'm worried that the geometric intuition could be broken by some scheme-theoretical subtlety.
(I understand that there are counterexamples to a slightly more general statement: the existence of a dominant morphism $\operatorname{Spec} B \to \operatorname{Spec} A$ need not imply that $A \to B$ is necessarily injective.)
Not necessarily. You can take $U=X=\mathrm{Spec}\,A$, where $A$ is a finitely generated $K$-algebra, and $V=D(f)$, for some $f \in A$, so that the map $\mathcal{O}_X(U) \rightarrow \mathcal{O}_X(U \cap V)$ is $A \rightarrow A_f$. So this map is injective iff $f$ is a regular element.
But that needn’t be the case: consider $A=\mathbb{C}[x,y]/(xy,y^2)$ and $f=x$.