Rankin was dismissed two minutes from time for a foul on John McGinn.
McNamara, whose side missed the chance to move into the top six, said: "I told the referee at the end that we'll take a look at it first; the way the lad turned into it I think made it look worse.
"I thought that in the first half, we were a bit negative with our play - we'd get so far, go back to goal and it ends up at our goalline - but in the second half I thought we did better.
"Keith Watson got forward well down the right hand side and put some good balls in for Stuart Armstrong to get on the end; I thought that on another day we could have got a goal.
"I'm disappointed we didn't get the three points, as those were two extra points we wanted to go and win to get into the top six."