You are correct that the Planning State Interaction page does have the solution, but you should not need to use multiple states to set this up. Since you have the container showing when the button is clicked, you are on the right path.
To have the container be hidden, you will need some type of trigger that changes the state value back to the default value or another value that does not make the container visible. While you can't create this with a single button, you can simulate it by using two buttons that look exactly the same and place them at the same position.
One that is visible when the container is off and has an On Click changing the state value so that the container becomes visible and hides the button itself. The second button needs to become visible only when the container is active, so using the same state value, and have an On Click set to turn the state value to the default state or another OFF state.
This will make it so that you can toggle the container with the same "button". It can be a little complex depending on your exact design so if you have any questions, just let us know.