Can I help Madanach and still become Thane of Markarth?
Solution 1:
That quest doesn't actually have an impact on whether you can become Thane or not. Speak to the jarl and he will likely give you a quest that will lead you to thanedom. You can see requirements for being a thane at UESP.