As for the notion that such an act takes a person out of the religion, as you asked, that is incorrect. It does not expel him from Islam. What he did is impermissible—indeed, forbidden—but it is not an act of unbelief.
Likewise, the idea of going to a shaykh to perform certain rites is a serious error and not part of the religion of Islam. When a sinner commits a wrongdoing, he is to repent to Allah directly, without seeking out a shaykh. That practice resembles the Christians, who go to their monks and churches so that, as they claim, those monks may absolve them of sin.
A Muslim, by contrast, has been commanded by Allah to repent privately, between himself and his Lord, with sincere repentance. Allah—glorified and exalted—is He—accepts the repentance of anyone who turns back to Him; there is no need to visit a shaykh. Allah knows best.
***
Compensation for a Wife
Question: My father is married to two women. The first has two sons and four daughters, while the second has two sons and two daughters. When he intended to perform the obligatory Hajj, he allocated a parcel of land from his property to the first wife, claiming that he had consumed some of her wealth and wanted her to pardon him. Several years ago she died before we divided the estate. Exactly one year ago, my father wished to divide the land among us, so he left the tract he had set aside for that wife outside the inheritance and added it to the share of her sons. This angered us—the children of the second wife—and we objected. Is my father allowed to give that land to his first wife even though she died before the inheritance was apportioned, and may only her two sons take her share to the exclusion of their sisters?
Answer: If the situation is as you have described—that your father gave this land