Function's analytic continuation is its own derivative
Not a positive answer, but an observation about the sort of analytic continuation which would satisfy your challenge problem. If $f$ has the desired property, then it has that property all the way around the path $\gamma$. That is, at any point on $\gamma$, if we continue $f$ one full time around $\gamma$ we obtain the derivative. Following is justification (it was not immediately obvious to me, though it may be to you).
First some notation.
Let $\gamma$ denote the path in question, assumed to be parameterized with domain $[0,1]$. Since $\gamma$ is closed, for $s\in[0,1]$, we can define $\gamma_s$ to be the concatenation of the restriction $\gamma|_{[s,1]}$ followed by $\gamma|_{[0,s]}$. Using modular arithmetic (modulo $1$) we can think of $\gamma_s$ having domain $[s,s+1]$.
Let $f_s$ denote the analytic continuation of $f$ along the path $\gamma|_{[0,s]}$ (viewed as having for its domain a neighborhood of $\gamma(s)$). We are assuming that ${f_0}'=f_1$.
Let $A\subset[0,1]$ be the subset such that $r\in A\Leftrightarrow$ the analytic continuation of $f_r$ along $\gamma_r$ is ${f_r}'$. We are assuming that $A$ contains $0$ (and is thus non-empty). It is immediate from the definition of analytic functions that $A$ is open. It is also not hard to show that $A$ is closed (since if the points where two functions are equal have an accumulation point in their common domain, they are equal in their common domain). Thus $A=[0,1]$.