Yes, this is possible.
Here is a proof. I omitted some of the arguments which are standard. Let me know if you need help reconstructing these.
In what follows, $C^i(M,N)$ is the space of $C^i$-smooth maps between $C^i$-smooth manifolds with topology of $C^i$-convergence on compacts.
Lemma 1. The subgroup of diffeomorphisms $Diff(S^1)$ is open in $C^1(S^1,S^1)$. (The same holds with $S^1$ replaced by a general compact manifold.)
Lemma 2. Let $z_0,...,z_n\in {\mathbb C}$ be distinct points and $w_0,...,w_n\in {\mathbb C}$ be arbitrary points. Then there exists a complex polynomial $p$ of degree $\le n$ such that $p(z_k)=w_k, k=0,...,n$. Moreover, such polynomial is unique and its coefficients depend continuously on $(w_0,...,w_n)$.
Lemma 3. (A form of Weierstrass approximation theorem, see e.g answers to this question.) $C^\omega(S^1, {\mathbb R}^2)$ is dense (in $C^1$-topology, of course) in $C^1(S^1, {\mathbb R}^2)$.
Lemma 4. Suppose we are given two finite ordered $n$-element subsets
$A=\{a_0,...,a_n\}$ and $B=\{b_0,...,b_n\}$ in $S^1$ with the same cyclic order. Then there exists a $C^1$-smooth (even infinitely smooth) diffeomorphism $h: S^1\to S^1$ sending $a_k$ to $b_k$, $k=0,...,n$.
Lemma 5. In the setting of Lemma 4, there exists a real-analytic diffeomorphism $g: S^1\to S^1$ such that $g|_A= h|_A$.
Proof. Using Lemma 3, construct a sequence $(h_m)$ in $C^\omega(S^1, {\mathbb R}^2)$ which $C^1$-converges to $h$, where $h$ is as in Lemma 4. In particular, for each $k$, $(b_k- h_m(a_k))\to 0$ as $m\to \infty$. Using Lemma 2, for each $m$, find a polynomial $p_m$ of degree $\le n$ such that $p_m(a_k)= b_k- h_m(a_k)$ for each $k$. In particular, the sequence $(p_m)$, regarded as maps in $C^1(S^1, {\mathbb C})$, converges to $0$ as $m\to\infty$. Set $f_m:= h_m + p_m$. Then for all $m$,
$$
f_m|_A= h|_A,
$$
each $f_m$ is real-analytic, and $f_m\to h$ in $C^1(S^1, {\mathbb C})$. Lastly, set
$$
g_m:= \frac{f_m}{|f_m|}, m\in {\mathbb N}.
$$
Again, $g_m$ is real-analytic, $g_m|_A= h|_A$ and $g_m\to h$ in $C^1(S^1,S^1)$. Lemma 1 implies that each $g_m$ is a diffeomorphism $S^1\to S^1$ for all large $m$. qed
Lastly:
Theorem 1. Suppose that $x_1< x_2< ...< x_{n}$ and $y_1<y_2< ... < y_{n}$ are real numbers. Then there exists a real-analytic diffeomorphism $f: {\mathbb R}\to {\mathbb R}$ such that $f(x_k)=y_k, k=1,...,n$.
Proof. Consider the stereographic projection $q: S^1\to {\mathbb R}\cup \{\infty\}$; it is real-analytic, actually, linear-fractional. Set $a_k:=q^{-1}(x_k), b_k:= q^{-1}(y_k), k=1,...,n$. Set $a_0=b_0=q^{-1}(\infty)$, the north pole of the unit circle. Then the
tuples $(a_0,...,a_n), (b_0,...,b_n)$ appear in the same cyclic order on $S^1$. By Lemma 5, there is a real-analytic diffeomorphism
$g: S^1\to S^1$ such that $g(a_k)=b_k, k=0,...n$. In particular, $g(a_0)=a_0=b_0$.
Lastly, set
$$
f:= q\circ g \circ q^{-1}.
$$
This map, when restricted to the real line, is real-analytic and satisfies $f(x_k)=y_k, k=1,...,n$. qed
With more work, one can prove (using similar ideas):
Theorem 2. Suppose that $M$ is a compact connected real-analytic manifold of dimension $\ge 2$. Then the group of real-analytic self-diffeomorphisms of $M$ is $n$-transitive for every $n<\infty$, i,e. given any finite subsets of distinct points $A=\{a_1,...,a_n\}$ and $B=\{b_1,...,b_n\}$ in $M$, there is a real-analytic diffeomorphism $f: M\to M$ such that $f(a_k)=b_k, k=1,...,n$.