Can you get cystitis, or something similar, from having sex?

Women certainly. Bacteria around the urinary opening are common in women prone to utis/cystitis + penile thrusts during intercourse can "massages" such bacteria up into bladder. Many bacterial strains thrive +multiply in urine thus causing utis, hence need to urinate after sex to eliminate both bacteria + "nourishing" urine. Men can get urethritis (std) from intercourse, cystitis unlikely as male urethra is longer.
Yes. This can happen due to occasional forcing of bacteria on skin to inside the urinary bladder.