A doctor cannot tell if a tumor is cancerous by just looking at the tumor but a doctor can tell if a tumor is cancerous by examining the cell or tissue samples under a microscope.
Sometimes blood work may need to be performed or other procedures to tell for sure if a tumor is cancerous or not but most times a doctor can examine the tumor under the microscope and see if it's cancerous but sometimes other procedures need to be done.