This happens when the agent whom you are trying to assign the ticket is not part of the group in which the ticket is assigned to. Try changing the group for the ticket and you should be able to find the agent under the right group.