Hi Gisele. Peanut's problem needs to be diagnosed specifically to determine the proper course of treatment. He is probably in pain rather than suffering temporary paralysis.
An orthopedic specialist would be best. X-rays will be needed to determine if it is hips. Yorkies are known for a congenital disease called Leggs Perthes:
Legg-Calvé-Perthes Disease in Dogs | petMD
Surgery is the only option if it is Leggs Perthes. The sooner the better.