Instead of Te-form + to iimashita , use:
Here’s a short story draft based on the phrase "gomu o tsukete to iimashita" (「ゴムをつけてといいました」— "He/she said to use a rubber / put on a condom"). gomu o tsukete to iimashita