If all you have is X or Y, then simply put, you can't. You need a game with access. This includes getting another 3DS and another copy of X or Y to get a fire type friend safari (convoluted but possible), a game from the fifth generation (but unless there is already a Ponyta with flame body on that game, that is not an option, as you can only obtain that from the dream world online, which was shut down), or oR or aS and using DexNav at Route 112 or Jagged pass. That last option is only after defeating/capturing Kyogre/Groudon and obtaining the national dex. If you have a friend with oR or aS, that would be you quickest and easiest option.
As a side note, don't trust/use the GTS, it is very broken as a trade system. Many more search criteria are required to make that useful.