Yes, simply use Imap.GmailLabelMessageByUID and Imap.GmailUnlabelMessageByUID methods.
Both methods use X-GM-LABELS extension to the IMAP protocol:
using (Imap imap = new Imap())
{
imap.ConnectSSL("imap.gmail.com");
imap.Login("pat@gmail.com", "password");
imap.SelectInbox();
long uid = imap.GetAll().Last();
imap.GmailLabelMessageByUID(uid, "MyLabel");
List<string> labels = imap.GmailGetLabelsByUID(uid);
imap.Close();
}
When you want to use system label instead of custom one, you can use FolderFlag class e.g.: FolderFlag.XStarred.Name