I disagree protecting your home is every ninja duty.
I agree. However, that's not all the Will of Fire is. There's also "protecting your friends" and ancestor worship. Those last two things have no place in the life of a
ninja. The needs of the village come before everything else, even friends and family.
Now, did Danzō do that? The answer is up for debate. He did eliminate threats to the village, but let other threats continue, such as Pain. However, he did that for the future of Konoha. To remove a weak leader and become the Hokage himself, which he believed would help Konoha. In that way, he is a real ninja.