Question: could not use the brush tool because the target layer is hidden?
Answer: You are getting an error because you are in "Quick mask edit mode". There are few ways to exit. You can, for example, use button or delete layer as well.