I'm sure i've read a few but the only ones coming to mind are:
Akane by Kirinin - Ranma believes he's Akane and has her form and is wanted for killing himself.
Amazonian Switcheroo by sara t. fontanini - Shampoo accidentally uses a potion that slowly switches her body with Ranma's and if not cured would eventually switch their metal states as well.
These ones don't quite match since they still know who they are after switching but may be close enough to what you are looking for.
Revenge rebirth by shad 4c - Ryoga wishes to have been born as Ranma and that Ukyo's soul never existed causing Ranma to have been born as her instead. As they grow up again Ranma as Ukyo vows her revenge.
Your Body, My Mind by Aurora A - Akane is jealous and wishes she was Ranma, they wake the next morning in each others bodies. (I don't have a link for this one.)
All the others I can think of even remotely similar are crossovers in which Ranma falls into a spring becoming a character from another series but he doesn't usually believe he is them. I'm sure I also remember a few Ryoga swapping bodies with Ranma fics but again they remember who they are and I'm not sure what those stories are called.