It's up to the dealership as to if they work with warranty issues on a modded vehicle. Many have said they have taken their car to a dealership and have had the warranty work done, even when the vehicle was modified. Tuners push this, but some have stated the dealer still worked with them. If the warranty issue has to do with a stereo for instance, I doubt that the dealership would void the warranty because a CAI or tuner was installed, as they would not be able to produce any reasonable evedence that these mods effected the stereo's operation.
To directly answer your question, yes, a dealer can tell if a tuner is/was installed, even if you flash it back to stock prior to the visit. The CPU's used today record any and all changes. It used to be that you could flash the stock tune back, dirve a few miles, and all was good. Not any more.
One guy was going to try to "beat the system" by buying a used PCM (never flashed), and then use his other PCM for being tuned. He then would install the second, non tuned PCM if he had to take the vehicle in for warranty work.
He never reported back though as to if this worked or not.
It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt.