From Wikipedia, I have the following two facts:
Solovay’s Model is a model of ZF in which all sets are measurable. In this way Solovay showed that in the proof of the existence of a non-measurable set from ZFC (Zermelo–Fraenkel set theory plus the axiom of choice), the axiom of choice is essential
HB can be proved using the ultrafilter lemma (UL), which is equivalent (under ZF) to the Boolean prime ideal theorem (BPI). BPI is strictly weaker than the axiom of choice… In ZF, the Hahn–Banach theorem suffices to derive the existence of a non-Lebesgue measurable set
Doesn’t (2) imply that you don’t need the axiom of choice to find a non measurable set, which is a contradiction with (1)?
All that (1) tells us is that $\mathsf{ZF}$ alone is not enough to prove the existence of a nonmeasurable set. It does not say that full $\mathsf{AC}$ is required, and indeed much less than $\mathsf{AC}$ is needed. So there is no tension between the two results. Indeed, Solovay's result can be thought of as showing that $\mathsf{DC}$ (a fragment of choice which does hold in Solovay's model) is "tame" in a way that $\mathsf{BPI}$ is not.