Recent observations discovered that some repeating fast radio bursts (FRBs) show complicated variations and reversals of Faraday rotation measures (RMs), indicating that the sources of these FRBs are embedded in a dynamically magnetized environment. One possible scenario is that repeating FRBs are generated by pulsars in binary systems, especially containing a high-mass companion with strong stellar outflows. Here we study the RM variations caused by stellar winds and a possible stellar disk. If the magnetic field is radial in the stellar wind, RMs will not reverse except if the magnetic axis inclination angle is close to 90°. For the toroidal magnetic field in the wind, RMs will reverse at the superconjunction. For the case of the toroidal field in the disk, the RM variations may have a multimodal and multiple reversal profile because the radio signals travel through different components of the disk during periastron passage. We also apply this model to FRB 20180916B. By assuming that its 16.35 day period is from a slowly rotating or freely precessing magnetar, we find that the secular RM variation can be explained by the periastron passage of a magnetar in a massive binary system. In addition, the clumps in the stellar wind and disk can cause short timescale (<1 day) variations or reversals of RM. Therefore, long-term monitoring of RM variations can reveal the environments of repeating FRBs.