Well... a few things. The ich medication in all likelihood would destroy the bacterial colony -- most ich medication is really harsh. However, the filter does more than just harbor bacteria. In particular, the filter return's splashing is the primary source of causing surface movement which greatly improves gas exchange. This is the primary way oxygen gets into the tank. And, when medicating, oxygen is often a limiting factor because lots of medicines work by oxidizing organic material. The medicine actually works by taking oxygen out of the water -- the oxygen your fish need to live!
Secondly, not that it matters because without ammonia as a food source, the bacteria in the filter are dead anyway, but ich is an obligate fish parasite. If they don't have access to fish during their life cycle, they will die. Any ich that is in your filter haven't had exposure to fish, so they will die.
Finally, what you want to do is water changes -- large ones. That will help keep the ammonia levels down. The other benefit is that by doing large water changes, you have take organic waste out of the tank -- organic waste that the medicine will also oxidize and not be available to kill the ich with. So, doing large water changes actually helps the medicine do its thing against the ich itself. Just be sure to do the water changes before adding the ich medicine.
I'd suggest you take a read through this page:
http
/www.skepticalaquarist.com/docs/health/ich.shtml it is one of the best webpages with information about ich on the Internet. The best thing you can do it arm yourself with knowledge to know thy enemy.