Yes, Kubfu can be either female or male. There are only a limited number of Legendary Pokémon that can have genders, as most usually are unknown. Plus, Kubfu and Urshifu are even rarer circumstances as they can be either gender. The only other Legendary Pokémon that shares this characteristic is Heatran.