From Bulbapedia, the community-driven Pokémon encyclopedia.
In the Pokémon manga, a situation will sometimes occur where a Pokémon knows a move it cannot learn legally in any of the games. It is unknown whether these are actual mistakes, a writing policy of not having to stick to the games too closely, or merely the Pokémon using an attribute that shares the name of a move in the games.
Occasionally, in-game event Pokémon that can be transferred onto the main series games have a move that is not normally included in that Pokémon's moveset (a prime example being Pokémon Box Ruby & Sapphire, which gave away four separate Pokémon with moves that were not normally available to that specific Pokémon).
List of Pokémon Adventures Pokémon with moves they can't learn in the games
List of Pokémon Pocket Monsters Pokémon with moves they can't learn in the games
How I Became a Pokémon Card
Pokémon in How I Became a Pokémon Card will often use moves that they cannot learn in the games. These are generally not errors, though, because this series is based on the Pokémon TCG; the "illegal" moves Pokémon use in this series are moves from their TCG cards.