Under recently new FDA laws that consider all contact lenses to be medical devices, regardless if they are vision correcting, you can only be sold contacts by a registrered and licenses Eye Car Professional, so yes.
If you are buying them online, you will usually have to get a prescription first locally, and then the site you buy them from will contact your Dr, or visa versa to verify that you can legally purchase the yellow contacts.
Because yellow contacts will be on your eyes, if you have never worn regular contacts before and this is your first time, you should take it serious and make sure you know exactly what you are doing before you begin to wear them.
Many people who have never needed contacts, or even glasses, decide they want to get some yellow contacts real quick and don’t do the research and end up damaging their eye or their contact lenses.
Just make sure that before you buy the yellow contacts, you get a prescription, you purchase the yellow contact lenses from a reputable and legal dealer and that you take proper care of your eye and the yellow contacts during the time you wear them and even store them. Because they last for a couple years, if you do plan on wearing them for Halloween, if you take the proper care you can reuse them for a couple Halloweens to follow.