A) Either rin was captured and controlled by Madara, forcing kakashi to kill her in order to activate obitos mangekyo as part of his master plan.
B) It was a Zetsu that appeared to look like Rin, which would still activate Obitos Mengekyo via Kakashi
C) Either Rin or kakashi was under a genjutsu and still kakashi killed rin in order to activate obitos mangekyo as part of madaras master plan.
Either or, I still think Madara had something to do with it.
On A, maybe. On B: zetsu clones revert to a zetsu body after being killed and C, well I already explained the genjutsu thing.