This is a subtle question, although our intuition seems to give a correct answer: yes, for non-constant $f$ the collection of $p\in\mathbb R$ such that $f(x+p)=f(x)$ for all $x\in\mathbb R$ is of the form $\mathbb Z\cdot \mu$ for some (minimal, non-zero) $\mu\in \mathbb R$.
Probably there is a more-elementary way to see this, but elementariness is not always a synonym for clarity... The way that I understand this is that the condition $f(x+p)=f(x)$ on $p$ (for fixed $f$) for a single $x\in\mathbb R$ is a closed condition, so the set of such $p$ is a closed subset of $\mathbb R$.
The conjunction of this requirement over all $x\in \mathbb R$ takes an intersection of those closed sets, so it is closed.
It is also a subgroup of $\mathbb R$!
Then one "classifies" the closed subgroups of $\mathbb R$: they are the trivial $\{0\}$, the whole $\mathbb R$, and the only intermediate cases are "lattices", namely subgroups of the form $\mathbb Z\cdot \mu$ for some $\mu>0$.
The hypotheses of the situation put us in the latter situation ...