The One Directioner - who split with the '22' singer in January after a brief romance - told Us Weekly: "It would be hypocritical for me to say she couldn't do it because everybody writes songs based on personal experience.
"I can't say I'd have dated someone less famous to avoid it."
Harry and Taylor when they first went public with their romance in November 2012
He also denied was worried about the prospect of the song, joking: "At least she's a great songwriter!"
Taylor - who was written songs about her famous exes in the past - told Rolling Stone magazine earlier this year that she only wants to be in relationships that provide her with material.
“I am getting to the point where the only love worth being in is the love worth singing about,” she said.
Meanwhile, Harry has admitted there could be a new lady in his life, admitting he has currently his eye on someone.
"There is… I’ve got someone that I like, yeah," he told Fabulous magazine last week.
Keeping quiet, he didn't go any further: "There’s just someone in mind."
"There’s always someone who’s the person you think about if something happens. But yeah. There’s nothing really happening at the moment."
Also on HuffPost:
Suggested For You
Get top stories and blog posts emailed to me each day. Newsletters may offer personalized content or advertisements. Learn more