Okay, first of all! It was the real kakashi and the real rin.
Now let me explain:
What I think happened is that the white zetsu created a close of rin, attacked kakashi, kakashi was like "hey..why are you going after me" and the zetsu revealed that it was him not rin, he then transformed back...