Yes, it can. You want to make sure none of the candy corn is touching the baking sheet, or it can melt and burn. As long as it is contained inside the cookie dough, you will not have any problems.