Don't "know" that he doesn't have the ace. He could very well have the ace. The ace is within his range, so to speak. You may think there is a 1% chance, a 15% chance or a 30% chance that he has a better ace, but don't try to read his exact hand. Think in terms of ranges.
You had four to an ace-flush plus TPWK with one card to go. By check-raising on that board you are saying "I have a made flush or something pretty good, such as TPTK, set or two-pair." You are semi-bluffing, representing a better hand than you actually have, but with something not completely worthless that draws to a made hand.
Your opponent decides that you are naked bluffing and reraises all-in with an even worse hand, which was a bad move on his part. You are essentially pot-commited with your semi-bluff now, so you have to call. The call was a good move, but you need to ask yourself some tough questions:
1) Do you feel comfortable check-raising against that opponent with top pair, weak-kicker plus ace-flush draw on that board? What are you trying to accomplish: fold him out or sucker him into getting pot committed himself? Is leading out a better option?
2) What are the chances he has a better hand than you? The made flush, better ace, two-pair, set? They are higher than zero, but how high?
3) How did you end up playing a pot out of position with A9? Depending on the tournament structure, the opponents and your table image, there is a good chance you want to avoid that.
4) How small were the bets on the flop (before the turn card), and what were you trying to accomplish with them?
Otherwise, sorry for your tough luck loss on the hand