(This is based on this blogpost, which I found through this answer.)
Pick a Hamel basis for $\Bbb R$ over $\Bbb Q$, that is a set of reals, $B$, such that every real number can be written as a unique linear combination of elements of $B$, with rational coefficients.
For $r\in B$ and $x\in\Bbb R$, let $x_r$ be the rational coefficient of $r$ in the linear combination resulting in $x$. Note that for all but finitely many $r$'s, it will be $0$. So in other words, $x=\sum_{r\in B}x_rr$ for every real number.
Claim. For a fixed $r$, the function $x\mapsto x_r r$ is periodic.
Proof. Note that if $r'\in B$ and $r'\neq r$, then $(x+r')_r=x_r$. $\square$
This easily generalises: if $A\subsetneq B$, then $x_A=\sum_{r\in A}x_r r$ is a well-defined function, and if $r\in B\setminus A$, then $x\mapsto x_A$ is periodic with period $r$.
Finally, we are ready to prove the claim about the identity function!
Fix $r\in B$, and let $f_1(x)=x_r r$, and $f_2(x)=x_{B\setminus\{r\}}$. Then $f_1+f_2=\operatorname{id}$, and by the above, both are periodic.
The axiom of choice was needed for obtaining the Hamel basis. Indeed, it is consistent without the axiom of choice that there is no such basis, in which case the above proof certainly does not work.
Of course, this is not a proof that the axiom of choice is required. One way to prove this is to show that any pair of periodic functions which can be added to the identity must be $\Bbb Q$-linearity, which under some conditions imply continuity, which means it is impossible. But I am not familiar with the theory of periodic functions enough to give you an answer off the cuff.