The realization of room-temperature ferromagnetism in ferroelectric thin films based on HfO2 is a crucial step in broadening the applicability of HfO2-based materials and advancing their utility in spintronics devices. Nevertheless, the substitution of magnetic ions may lead to a reduction in resistivity, posing a challenge to the maintenance of ferroelectricity. Additionally, the resulting dilute magnetic semiconductors often exhibit relatively insignificant magnetic properties. In this study, we achieved substantial room-temperature ferromagnetism and anisotropic magnetism in epitaxial thin films of yttrium-doped HfO2 (HYO) on (111)-oriented yttrium-stabilized zirconia substrates. Remarkably, room-temperature ferromagnetism was observed in the as-grown HYO thin films, and its magnitude was significantly amplified through an annealing process. Simultaneously, the anisotropic magnetization behavior in the HYO film could be modulated by adjusting the film thickness and employing different temperature annealing procedures. The variations in anisotropic magnetization and ferromagnetism were attributed to changes in the concentration of oxygen vacancies, which were influenced by both film thickness and annealing conditions. These findings suggest that the manipulation of thickness and defects can effectively control the anisotropic ferromagnetic properties of epitaxial HYO thin films, thereby holding promise for the integration of metal-oxide semiconductors with spintronics.