Should contractors who work onsite occasionally participate in the end of year employee appreciation activities (luncheon, receive gift)?
That's exactly the issue. They are not part of the team. Things like having contractors attend team meetings can come back to bite you later if their contracting status is questioned (leading to benefits administration and overtime liability, among other things). The tests for contractor versus employee are not simple check lists and must be examined on their own merits on a case by case basis. The stronger your contracting case is, the less likely having them show up at the Christmas party will be a problem. The weaker it is, the more such incidents can be used by plaintiff's attorney to demonstrate the employment nature of the relationship.
Take a look here: http://www.irs.gov/pub/irs-pdf/p15a.pdf
That may not be the current rules, but it will give you an idea about what's going on here.