If I understand you correctly, you want to do this:
When you create a case, you want to update the entity "membership" which is connected to "customer", right?
You can do this with two workflows. First, you need workflow A which is triggered when you create a case. If the lookup "contact" is filled, you start a child workflow (workflow B). Workflow B launches from the contact entity and updates the related membership-entity.