Elaborating more on the previous answer, here is a proof that it's indeed not possible.

Let us assume that there is a unitary $ U $ acting on qubit $a$ and on $m$ ancillary qubits such that $U\Big(|s \rangle \otimes |0 \rangle^m_{anc}\Big)$ is the desired output. Then on inputs $|+ \rangle, |- \rangle$ the outputs are

- $U\Big(|+ \rangle \otimes |0 \rangle^m_{anc}\Big) = |+ \rangle \otimes |\phi_+ \rangle_{anc} $
- $U\Big(|- \rangle \otimes |0 \rangle^m_{anc}\Big) = |- \rangle \otimes |\phi_- \rangle_{anc} $

So we may write
$$U = |+ \rangle \langle +| \otimes W_+ + |- \rangle \langle -| \otimes W_-$$
where $W_{\pm} |0 \rangle^m = |\phi_{\pm} \rangle $.

On input $|1 \rangle$ we have the output state
$$ |\chi \rangle = U\Big(|1 \rangle \otimes |0 \rangle^m_{anc}\Big) = \frac{1}{\sqrt{2}} \Big(|+ \rangle \otimes |\phi_+ \rangle_{anc} - |- \rangle \otimes |\phi_- \rangle_{anc}\Big)$$
and since we want the qubit to be in $|1 \rangle$ state, it must hold that
$$ \langle \chi| \Big( |1 \rangle \langle 1| \otimes \mathbb{1} \Big) |\chi \rangle = 1 \implies \text{Re}\{\langle \phi_+ | \phi_- \rangle\} = 1 \implies |\phi_+ \rangle = |\phi_- \rangle := |\phi \rangle$$
But
$$ U\Big(|0 \rangle \otimes |0 \rangle^m_{anc}\Big) = \frac{1}{\sqrt{2}} \Big(|+ \rangle \otimes |\phi_+ \rangle_{anc} + |- \rangle \otimes |\phi_- \rangle_{anc}\Big) = |0 \rangle |\phi \rangle_{anc}$$
so finally $U\Big(|s \rangle \otimes |0 \rangle^m_{anc}\Big) = |s \rangle \otimes |\phi \rangle_{anc}$ and $U$ does not flip $a_0, a_1$.

To overcome this impossibility, you may want to obtain an algorithm that has the desired output state only with some success probability. A solution towards this direction is the following: if you can obtain two copies of the input state $|s \rangle$, then

Apply amplitude amplification on the first copy to amplify the amplitude of $|0 \rangle$ state.

Apply an X gate on the second copy and then a Controlled-X (control is the first copy). Now the state is $ c_0 |0 \rangle X|s \rangle + c_1 |1 \rangle |s \rangle $.

Measure the first qubit. If it's zero, then the state of the second qubit is in the correct state ($X|s \rangle$). If it's one, then there is some error probability but this will be small since from step 1, $|c_0|^2$ will be big if $a_0 \neq 0 $.

a_0>0 does not even make sense: The amplitudes are only defined up to a global phase. – Norbert Schuch – 2020-08-29T22:19:35.370