The enigmatic object HD 45166 is a qWR star in a binary system with an orbital period of 1.596 day, and presents a rich emission-line spectrum in addition to absorption lines from the companion star (B7 V). As the system inclination is very small (i=0.77 +- 0.09 deg), HD 45166 is an ideal laboratory for wind-structure studies. The goal of the present paper is to determine the fundamental stellar and wind parameters of the qWR star. A radiative transfer model for the wind and photosphere of the qWR star was calculated using the non-LTE code CMFGEN. The wind asymmetry was also analyzed using a recently-developed version of CMFGEN to compute the emerging spectrum in two-dimensional geometry. The temporal-variance spectrum (TVS) was calculated for studying the line-profile variations. Abundances, stellar and wind parameters of the qWR star were obtained. The qWR star has an effective temperature of Teff=50000 +- 2000 K, a luminosity of log(L/Lsun)=3.75 +- 0.08, and a corresponding photospheric radius of Rphot=1.00 Rsun. The star is helium-rich (N(H)/N(He) = 2.0), while the CNO abundances are anomalous when compared either to solar values, to planetary nebulae, or to WR stars. The mass-loss rate is Mdot = 2.2 . 10^{-7} Msun/yr, and the wind terminal velocity is vinf=425 km/s. The comparison between the observed line profiles and models computed under different latitude-dependent wind densities strongly suggests the presence of an oblate wind density enhancement, with a density contrast of at least 8:1 from equator to pole. If a high velocity polar wind is present (~1200 km/s), the minimum density contrast is reduced to 4:1. The wind parameters determined are unusual when compared to O-type stars or to typical WR stars. (abridged)