Oh come on! Not this thread AGAIN! I know that not all of you will have been around as long as some of us, but we've had this discussion a billion times already! But since not all of you seem to remember that, here's a brief recap...
Yes it does seem highly unlikely that the Andalite's unique weapon would be aboard a Dome Ship, let alone a single fighter ship. However, if they did have it on board, I would think that their hero of the people (and probably their best pilot) would be a likely candidate to choose for its protection. Perhaps after being caught off guard by the Yeerks, the captain asked Elfangor to take it on his ship to keep it out of Yeerk hands (or it was already aboard his fighter in case such an attack on the Dome Ship occured).
The more likely solution is that the Ellimist intervened in some way, perhaps by placing the device on Elfangor's ship, or maybe by simply telling Elfangor that he would need it. Or Elfangor figured it out on his own based on what he saw when the Ellimist took him back to his original place in space and time (where he saw the time lines of the Animorphs combine).
To be honest though, I personally think that KA never really thought up a reason for why the box was on his ship. It just had to be there for the story to work.
EDIT: I also like RYTX's idea: "Cause he's Elfangor, and he's bad ass!"