There's a scripting addition called
AudioCDgh that should do it (there's probably others, but this one appears to work well). To install, use the above link to download the archive & move/copy the enclosed scripting addition to the "Scripting Additions" folder in the System Folder. Then, just save the following line (2 words really) in "Script Editor" as a Classic Applet:
eject cd
Very simple script... but should work fine - when run, it should open the cd tray with or without a cd. It also works well linked to a function key using the Keyboard control panel (if hot function keys are available as an option)... in this case, though, it will automatically switch to the Finder to run the script. That scripting addition has a bunch of other audio/CD-related functions that may be useful - maybe open its dictionary for more info...