Let $X$ be a complex algebraic variety (integral, separated scheme of finite type over $\mathbb C$) and $U\hookrightarrow X$ an open subvariety. I will say that $f\in\mathscr O_X(U)$ is continuable if there exists some $g\in \mathscr O_X(X)$ with $g|_U=f$. My question is simply: Can it happen that $f$ is not continuable, but there exists a $k\in\mathbb N^+$ with $f^k$ continuable?
I was debating with a friend who thinks it is possible but could not give an example, while I thought that it is impossible but wasn't able to give a satisfying proof. So, I'd be really glad if you could provide one of the two (that is, a simple example of such a phenomenon or a proof that it can not happen).