No. I have broken lots of laws (speeding, for example) and even though I haven't been to church in 10 years, I am still on the membership records. To be excommunicated from the church, you have to either commit a sin of "
gross iniquity" (sex crimes, murder, etc.), becoming involved in or advocate for polygamy, or commit apostasy (declaring yourself a prophet, advocating for women to have priesthood, saying joseph smith was faking it, etc.). You can even have personal beliefs that contradict church doctrine, but if you are trying to lead others astray, so to speak, that's when it becomes a problem. Think John Dehlin or Kate Kelly.