$
\newcommand\R{\mathbb R}
$
Yes, but you also have to take the conjugate.
Without going into too much detail, we can think of quaternions as elements of the 3D real Euclidean Clifford algebra, which is a way of defining a product on vectors in $\R^3$ (though the product of two vectors need not be a vector). This product is not necessarily commutative, but it is associative. It's defining property is that vectors square to scalars. There is an element $I$ of the Clifford algebra, called a (left-handed, unit) pseudoscalar, which commutes with the whole algebra and is such that if $v \in \R^3$ then $vI$ is the corresponding (imaginary) quaternion.
Swapping the $x$- and $z$-axes results in a reflection. Where the Clifford algebra helps us is that for any $v, x \in \R^3$ (with $v^2 = 1$ for simplicity), the quantity $-vxv$ is exactly the reflection of $x$ through the plane orthogonal to $v$ (and it follows from this that a unit quaternion $q$ performs a rotation via $qx\bar q$). So let $x$ be in your first coordinate system and $x'$ be the corresponding vector in your second system so that
$$
x = -vx'v,\quad v = \frac1{\sqrt2}(e_z - e_x),
$$
where $e_x, e_z$ are the positive unit vectors along the $x$ and $z$ axes, respectively. This $v$ is a unit vector so $v^2 = 1$. Then a unit quaternion $q$ acts on $x$ by
$$
x \mapsto qx\bar q,
$$
but this means
$$
-vx'v \mapsto -qvx'v\bar q
\implies
x' \mapsto vqvx'v\bar qv,
$$
and I will state that it is a fact that $v\bar qv = \overline{vqv}$. Hence $q$ maps from system 1 to system 2 via
$$
q \mapsto q' = vqv.
$$
Every quaternion $q$ is of the form $q = q_R + q_II$ where $q_R \in \R$ and $q_I \in \R^3$, so
$$
q' = vqv = q_Rv^2 + vq_IIv = q_R - (-vq_Iv)I,
$$
the last equality following since $v^2 = 1$ and $I$ commutes with the whole algebra. To get $q'$ then, we see that we need to
- Swap the $x$ and $z$ components of the imaginary part of $q$ (equivalently, the $i$ and $k$ components). This is the $-vq_Iv$ part above.
- Take the conjugate. This is the minus sign between $q_R$ and $(-vq_Iv)I$.