The sentences were suspended for three years, meaning they will not go to prison unless they reoffend, he adds.
The video shows three men and three unveiled women dancing on the streets and rooftops of Tehran.
In six months, it has been viewed by over one million people on YouTube.
The majority of people involved in the video were sentenced to six months in prison, with one member of the group given one year, lawyer Farshid Rofugaran was quoted by Iran Wire as saying.
The "Happy we are from Tehran" video was brought to the attention of the Iranian authorities in May, after receiving more than 150,000 views.
Members of the group behind the video were subsequently arrested by Iranian police for violating Islamic laws of the country, which prohibit dancing with members of the opposite sex and women from appearing without a headscarf.
They later appeared on state-run TV saying they were actors who had been tricked into make the Happy video for an audition.
The arrests drew condemnation from international rights groups and sparked a social media campaign calling for their release.
Williams, whose song was nominated for an Oscar earlier this year, also protested at the arrests.
"It is beyond sad that these kids were arrested for trying to spread happiness," he wrote on Facebook.
Six Iranians arrested for appearing in a video dancing to Pharrell Williams' song Happy have been sentenced to up to one year in prison and 91 lashes, their lawyer says.