Essentially, whether or not the Prime Directive applies anymore depends on what the most likely outcome is.
If the aliens in question are almost certainly going to break or destroy the ship, on purpose or by accident, then they are still a pre-warp civilization, so hands-off.
If instead they most likely will master control of the ship enough to come visit, or to build ships of their own, then it's time to stop in and say welcome to the neighborhood.
If it isn't clear which is most likely, each option will be rated for "how bad would it be if we are wrong".
Like, is the ship a threat to our ships, so if they bump into us and shoot lives will be lost? How likely are they to shoot? How xenophobic/xenophillic are they? Will there be mass suicides when they learn about the Federation?
In short, the exact reaction to the situation as described would be to
gather more information, because there isn't enough there to make a decision this big.
