Looking for a way where a joint with ball and socket or universal joint type of movement will freeze or lock in place, preventing movement, when a load is placed on the ball, and will unfreeze or unlock when the load is removed, restoring free movement.
I am trying to understand your question. In order to rotate the ball joint, you must apply a force. The ball joint could not move if it were to lock under any load. However, a joint that automatically locks for loads that are greater than some arbitrary threshold value sounds plausible.
I am not aware of any mechanism to have this behavior with a ball joint (I have asked some colleagues if they knew, let me know if there is), but the implementation can be quite complex even for 1-DoF joints (e.g. seat-belts).
If you must use a ball joint, an option for you could be an active ball joint mechanism such as ABENICS Active Ball Joint Mechanism prototype (very cool, but far from a mature technology). A more conventional approach could be using three active revolute joints. Otherwise, you will have to review your design requirements.