It seems that there are loose and varying definitions of terms related to hot peppers!
Essentially, if the word "chili" refers to the dish involving beans, tomatoes, etc. then it means a spice mixture. But if it means chili pepper then it might be just a ground hot pepper and not a spice mixture - in which case it could be cayenne. So both could be right. You have to go on a case by case basis. You can usually tell by looking at the spice, but if not, you can certainly tell by taste!
To be sure, though, you can buy things specifically marked "cayenne".