I'll answer from the standpoint of the manga, which I consider to be more canon than the anime as it has a flowing plot, devoid of pointless fillers, and has something called continuity.
The Pokéballs in the manga have been stated to merely shrink that which capture, though the method through which this is accomplished is unknown. We know from both the manga and game that Pokémon can take inanimate items with them, in the form of the Quick Claw and various other attachable items. These do not fall off upon the host being returned to its Pokéball, repeatedly reattached by the trainer.
Since it appears as if foreign materials are acceptable within a Pokéball's containment field, and it has been stated the entire Pokémon is shrunk, nothing else, I find it likely that you would shrink as well and remain inside the Pokémon. After all, nothing else a Pokémon eats is left behind after it's captured.
To answer your second question, based on the anime's theory of turning the Pokémon back into their energy base, the situation would remain unchanged, and when the Gyarados is released the Psyduck would be (relatively) alive within it. The theory of them returning to energy is an interesting one in that such a state would render the Pokémon unchanging. Energy does not age or change, nor is it created or destroyed. Psyduck would not be digested, nor would it be able to crawl out of the Gyarados' mouth, as if the Gyarados would let it in the first place. A buffer within the Pokéball keeps the energy in a static state so it does not change, and as long as the Pokéball remains intact the Psyduck and Gyarados will be exactly the same as they were when the Gyarados was returned to the Pokéball.