the only way it was implanted is if it was madaras rinnegan before he died in which case he would have sharingan abilitys and he never used any (and why wouldnt he if he could they are awesome) which is why i dont think it was implanted.This, from what we have seen it seems that the Rinnegan was implanted in Nagato