Let $A$ be a commutative integral domain over a field $k$ of characteristic zero. Assume that the invertible elements of $A$ consists of $k^*$ only. Let $a \in A-\{0\}$ (it is not known whether $a$ belongs to $k^*$ or not), and let $b$ be an algebraic element over $A$ (taken from an algebraic closure of $A$. $b$ is not known to be integral over $a$, just algebraic). Let $f$ be the minimal polynomial of $b$ over $A$, $f(t)=a_nt^n+a_{n-1}t^{n-1}+\cdots+a_1t+a_0$ ($f$ is irreducible).
Define $\hat{B}:=A[b][a^{-1}]$.
I am curious to know if the following question has an easy answer (which I have missed):
When the invertible elements of $\hat{B}$ are contained in $Q(A)$, the field of fractions of $A$?
Remarks: (1) I wish to further assume that $B:=A[b]$ is an integral domain (of course, $Q(A) \subseteq Q(B)$. Further assume that $Q(A) \subsetneq Q(B)$.
(2) If it happens that $a_0=a$, then $0=f(b)=a_nb^n+a_{n-1}b^{n-1}+\cdots+a_1b+a$, so $b(a_nb^{n-1}+a_{n-1}b^{n-2}+\cdots+a_1)a^{-1} =(a_nb^n+a_{n-1}b^{n-1}+\cdots+a_1b)a^{-1}=-aa^{-1}=-1$, which means that $b$ is invertible in $\hat{B}$. In this case the invertible elements of $\hat{B}$ are not contained in $Q(A)$, since if they were contained in $Q(A)$, then $b \in Q(A)$, and then $Q(A)=Q(B)$, which contradicts our assumption that $Q(A) \subsetneq Q(B)$.
(3) If $\tilde{B} \ni u=\sum a_{ij}b^ia^{-j}$, $a_{ij} \in A$, is invertible in $\tilde{B}$, then there exists $\tilde{B} \ni v=\sum a'_{ij}b^ia^{-j}$, $a'_{ij} \in A$, such that $uv=1$. Then $(\sum a_{ij}b^ia^{-j})(\sum a'_{ij}b^ia^{-j})=1$, and then we get some polynomial $g$ over $A$, having coefficients in $k[\{a_{ij}\},a]$, such that $g(b)=0$, so $f$ divides $g$. But I am not sure how to continue.