Hello, Welcome back to Just Answer. It probably is not related to muscular dystrophy. It may be a problem with the ligaments or tendons that hold the patella (the kneecap) or even the bones that comprise the knee joint in place. Thorough xrays and an MRI would show what the problem is. The knee doesn't have a socket like a shoulder joint does, so there really isn't anything to "come out of place." An orthopedic doctor is the one to see about this.
That is such a shame. Be careful when you move to prevent it happening again. It often happens when your foot is placed firmly on the floor and you turn your upper body. This twisting movement strains the supporting structures of the knee. There is a list of free clinics in the link below. Maybe you can find one near you that will offer referral to someone who will actually help you. Another possibility is to check with an orthopedic clinic associated with a public teaching hospital.