Almost every Pokémon from Gen 3 onwards (with some very few fringe exceptions, like Spiky-Eared Pichu and Cosplay Pikachu, and I'm pretty sure Totems as well, since they can't be moved into Poke Bank) can be migrated/transferred to future generations via the Pal Park (Gen 3 -> Gen 4), Poke Transfer (Gen 4 -> Gen 5), or Poke Bank (Gen 5 -> Gen 6/7, and Gen 6 -> Gen 7). However, this is a one-way transfer; once sent to a future generation, it is impossible to transfer a Pokémon back.
For the fringe examples, the reason why they can't be transferred to newer games is because their data only exists in their debut games. The three examples I listed above are the only three cases I am aware of (if I missed anything, please correct me). The only other case of a Pokémon being unable to transfer is if it fails the Poke Bank's hack check, and even then, there are many reports of hacked Pokémon getting through.