Like a gym leader or any random trainer asking for a battle have a Shiny Pokemon?
Okay. THERE IS 1 trainer. Just 1.
In the Trainer Tower on Seven Island in FireRed and LeafGreen, there is a trainer with a Shiny Espeon.
I have been playing Pokemon for a very long time and I have never come across a trainer / gym leader with any shiny pokemon, so no, I don't think they can...
((in the show, pokemon, doesn't Iris have a shiny Hydreigon?))
There is a trainer with a shiny Feraligatr in the trainer tower at 7 island. It was probably done to introduce shiny Pokemon to new players