The BiPo-3 detector, running in the Canfranc Underground Laboratory (Laboratorio Subterraneo de Canfranc, LSC, Spain) since 2013, is a low-radioactivity detector dedicated to measuring ultra low natural radionuclide contaminations of $^{208}$Tl ($^{232}$Th chain) and $^{214}$Bi ($^{238}$U chain) in thin materials. The total sensitive surface area of the detector is 3.6 m$^2$. The detector has been developed to measure radiopurity of the selenium double $beta$-decay source foils of the SuperNEMO experiment. In this paper the design and performance of the detector, and results of the background measurements in $^{208}$Tl and $^{214}$Bi, are presented, and validation of the BiPo-3 measurement with a calibrated aluminium foil is discussed. Results of the $^{208}$Tl and $^{214}$Bi activity measurements of the first enriched $^{82}$Se foils of the double $beta$-decay SuperNEMO experiment are reported. The sensitivity of the BiPo-3 detector for the measurement of the SuperNEMO $^{82}$Se foils is $mathcal{A}$($^{208}$Tl) $<2$ $mu$Bq/kg (90% C.L.) and $mathcal{A}$($^{214}$Bi) $<140$ $mu$Bq/kg (90% C.L.) after 6 months of measurement.