Is it true that you shouldn't take ibuprofen if you are on zoloft (sertraline)?

Technically. Technically there is an interaction between nsaids and zoloft. Celebrex (celecoxib) is safe to take with it though.
Not necessarily. In general, not a problem to take both. I believe there is a moderate risk of gastrointenstinal bleeding when both ssris and nsaids are taken chronically (i.e. Every day), though i don't think there's any research showing significant risk of occasional NSAID use in patients taking ssris. It would be important to know what other GI bleeding risks you have, if any.
Yes. Zoloft (sertraline) may increase the side effects of Ibuprofen leading to increased bleeding. In addition, Ibuprofen may decrease the effectiveness of zoloft (sertraline). Not a good combination.