Yes it is true. Let me show that the existence of $\phi$ implies that the norm of $B^*$ is associated to an inner product. Then it follows easily that the spaces are Hilbert.
It suffices to verify that the norm is an inner product one on every two-dimensional subspace. (Indeed, this property is equivalent to the parallelogram law, which involves only two-dimensional configurations.)
Let $V$ be a two-dimensional subspace of $B^*$ (equipped with the restriction of the norm of $B^*$) and $V^*$ the dual of $V$ (equipped with the norm dual to this restriction). There is a natural map $\pi:B\to V^*$ dual to the inclusion $V\to B^*$. Namely $\pi(x)(f)=f(x)$ for $x\in B$, $f\in V$. Note that $\pi$ does not increase the norm: $\|\pi(x)\|\le\|x\|$ for all $x\in B$.
Let $D$ be the unit ball of $V$ and $E\subset V$ the maximum-area ellipse contained in $D$ (i.e., the John ellipsoid of $D$). Let $\Sigma$ be the set of points where the boundaries of $D$ and $E$ meet. It is easy to see that $\Sigma$ contains at least two pairs of opposite points. The ellipse $E$ is a unit ball of a Euclidean norm $\|\cdot\|_E$ on $V$. Since $E\subset D$, we have $\|f\|_E\ge\|f\|$ for all $f\in V$ and equality is attained only if $x$ is proportional to an element of $\Sigma$.
On $V^*$, there is a dual Euclidean norm, denoted by $\|\cdot\|^*_E$. There we have $\|y\|^*_E\le \|y\|$ for all $y\in V^*$. The norm $\|\cdot\|_E$ is associated to an inner product, which defines an isomorphism $I:V\to V^*$ preserving the Euclidean norm.
For every $f\in\Sigma$, we have $\pi(\phi(f))=I(f)$. Indeed, $\|\pi(\phi(f))\|\le\|\phi(f)\|=1$, hence $\|\pi(\phi(f))\|^*_E\le 1$. On the other hand, $\pi(\phi(f))(f)=f(\phi(f))=1$. Since $\|f\|_E=1$, this is possible only for $\pi(\phi(f))=I(f)$.
Now consider two linearly independent vectors $f,g\in\Sigma$ and look at the distance between $f$ and $-g$. Since $\phi$ is an isometry, we have
$$
\|f+g\|=\|\phi(f)-\phi(-g)\| \ge \|\pi(\phi(f)-\phi(-g))\| .
$$
The r.h.s equals
$$
\|\pi(\phi(f))-\pi(\phi(-g))\| = \|I(f)-I(-g)\|=\|I(f+g)\|
$$
since $\pi$ and $I$ are linear and $f,-g\in\Sigma$.
Thus $\|I(f+g)\|\le \|f+g\|$ and therefore
$$
\|I(f+g)\|_E^*\le\|I(f+g)\|\le \|f+g\| \le \|f+g\|_E .
$$
But $I$ preserves the Euclidean norm, so the inequalities turn into equalities. In particular, $\|f+g\|= \|f+g\|_E$, hence $f+g$ is proportional to an element of $\Sigma$.
Thus we have proved that, for every $f,g\in\Sigma$, the normalized bisector $\frac{f+g}{\|f+g\|}$ also belongs to $\Sigma$. Since $\Sigma$ is a closed subset of an ellipse and contains more than two points, it follows that $\Sigma$ is the whole ellipse. This means that $D=E$, so the norm on $V$ is Euclidean. Q.E.D.
Remark. The proof would be much easier (in fact, nearly trivial) if we assumed in advance that $\phi$ is a restriction of an isometry between $B^*$ and $B$. Then it would be linear by Mazur-Ulam and one could just define the inner product of $f,g\in B^*$ by $2\langle f,g\rangle=g(\phi(f))+f(\phi(g))$.