I would say yes. When I was on bactrim for 2 months last year, taking Imodium had no side effects and continued to do its job.
as a side note, when I was once on augmentin for several days and it wrecked my GI system, it was the Imodium that calmed things down. Not saying that will happen to you, but I just wanted to mention it.