That is a gross mis-characterisation of Freemasonry.
It was the occultist, Aleister Crowler who coined the phrase Do what thou wilt shall be the whole of the law in the 20th century.
He modeled this on the ancient Wiccan teaching
If it harm none, do what ye will
And if you think about it, the Wiccan teaching is warning you to avoid karma, but avoiding harm to others. And it is specifically this bit about Karma that Crowley removed.
Karma, like the Law of Attraction, is another Universal Law. It is the Law of Action and Reaction, the Law of Cause and Effect. Whatever you’ve done unto others will be done unto you. It is basically the Biblical Law of “An Eye for an Eye.”
New Age teachers nowadays often teach something called the Law Of Attraction and tell students that you can do anything, you are masters of your universe. This is a fundamentally Satanic philosophy because it leaves out the Law of Karma, and your connection to the source of all creation, God, which is why your Intention is really so powerful. But it has to be tempered with prayer, direct communication with God and acceptance of God's guidance.
Satanism seeks to LOCK THE DOOR between a person and God