We report on measurements of the oxygen isotope (16O/18O) effect (OIE) on the transition temperature Tc and the zero-temperature in-plane magnetic penetration depth λab(0) in the stoichiometric cuprate superconductor YBa2Cu4O8 by means of muon-spin rotation/relaxation. An analysis of the temperature evolution of λab−2 in terms of coexisting isotropic s-wave and anisotropic d-wave order parameters (s+d-wave) reveals that the OIE on the superfluid density ρs(0)∝λab−2(0) stems predominantly from the d-wave component while the contribution of the s-wave one is almost zero. The OIE on the transition temperature Tc is found to be rather small: δTc/Tc=−0.32(7)%, compared to the total OIE on the superfluid density ρs(0): δρs(0)/ρs(0)=−2.8(1.0)%. The partial OIE’s on the corresponding d-wave and s-wave components of ρs(0) are δρs,d(0)/ρs(0)=−3.0(1.2)%, and δρs,s(0)/ρs(0)=0.2(1.2)%, respectively. Our results demonstrate that polaron formation in the CuO2 planes is the origin of the observed OIE in the d-wave channel. In the much weaker s-wave channel, fermionic quasiparticles are present, which do not contribute to the OIE on ρs(0). Our results support the original idea of K. Alex Müller on the polaronic nature of the supercarriers in high-temperature cuprate superconductors.