Let $a,b$ denote the generators of the copies of $\mathbb{Z}_2$ in the free product $\mathbb{Z}_2*\mathbb{Z}_2$.
The infinite dihedral group is described by: $$D_{\infty} = \; \left<r,s \;|\; srs=r^{-1}, s^2=1 \right>$$
I have seen that one may define an isomorphism: $$\phi\colon \mathbb{Z}_2*\mathbb{Z}_2\to D_\infty,$$ by \begin{eqnarray*}\phi(a)&=&rs,\\ \phi(b)&=&s.\end{eqnarray*}
My question is, can we define an analogous map $$\widehat{\phi}\colon \mathbb{Z}*\mathbb{Z}\to D_\infty,$$ by \begin{eqnarray*}\widehat{\phi}(\hat{a})&=&rs,\\ \widehat{\phi}(\hat{b})&=&s,\end{eqnarray*} where, $\hat{a},\hat{b}$ denote generators of the copies of $\mathbb{Z}$ in the free product $\mathbb{Z}*\mathbb{Z}$.
If this map is well defined, then is it an isomorphism?
Yes your map $\widehat{\phi}$ is well defined. The elements $\hat{a},\hat{b}$ freely generate $\mathbb{Z}*\mathbb{Z}$, so you can define $\widehat{\phi}$ just by specifying where $\hat{a},\hat{b}$ go.
Note this situation is different to the map $\phi$, as there the elements $a,b$ generate $\mathbb{Z}_2*\mathbb{Z}_2$ subject to the relations: $$a^2=1,\qquad b^2=1.$$ Thus once you specify $\phi(a),\phi(b)$, you need to check that $\phi$ respects these relations.
That is you must check that $$\phi(a)^2=1,\qquad \phi(b)^2=1.$$ Note that both of these equations are true: $$(rs)^2=1,\qquad\qquad s^2=1,$$ in $D_\infty$.
So defining the map $\widehat{\phi}$ is in a sense easier than defining $\phi$ was. However, unlike $\phi$, the map $\widehat{\phi}$ is not an isomorphism.
In fact it is not injective. The elements $1, \hat{b}^2\in \mathbb{Z}*\mathbb{Z}$ both map to the same element $1\in D_\infty$.
In fact it is impossible to construct an isomorphism $\mathbb{Z}*\mathbb{Z}\to D_\infty$, because the groups are not isomorphic. Whilst $s\in D_\infty$ squares to $1$, there is no non-trivial element in $\mathbb{Z}*\mathbb{Z}$ which squares to $1$.