Must one be sinless to partake of the sacrament?

My answer is no, although one should be penitent.

The sacrament, also called "sacrament of the Lord's supper", is the bread and water of which Mormons partake in remembrance of Jesus, at the weekly meeting.

Christ, speaking to the Nephites in the Book of Mormon, counsels, "And now behold, this is the commandment which I give unto you, that ye shall not suffer any one knowingly to partake of my flesh and blood unworthily, when ye shall administer it; for whoso eateth and drinketh my flesh and blood unworthily eateth and drinketh damnation to his sould; therefore if ye know that a man is unworthy to eat and drink of my flesh and blood ye shall forbid him." (3 Nephi 18:29-30)

The questions of what does "unworthy" mean must generally be answered by the individual.

The verses are often interpreted as saying that we should not participate in the sacrament if we have some unresolved serious sin.

The next verse, however, leads me to believe that Christ is referring to sin serious enough for excommunication ("... if... he repenteth and is baptized...").

However, I believe bishops also apply this to a less-serious case where "disfellowship" occurs rather than excommunication, and possibly even cases not serious enough for disfellowship.

In any case, partaking of the sacrament is in general a personal decision, and it sometimes happens that individuals decide not to partake because of feelings of unworthiness.