Only if the missile's seeker head had a clear view of the target. The missile is blind if tucked inside a weapons bay. So integrating it into the f-117 would not have been as simple as bolting a rail to the wing.
You have to uncage the seeker head in order for it to track. You would be just dropping it with the seeker pointing forward and hoping that the missile locks onto it with a limited view. The seeker is uncaged normally when you are tracking a target before you fire it. The pilot would have no idea if the missile would track when dropped.
Can't this be solved (for a new aircraft) by having a similar seeker on the aircraft (IRST) and letting the missiles tap into that, so that it can sort of "see" while in the bay, and you can be more or less sure that once deployed it will actually track?
If the launching aircraft has an A2A radar, newer versions of the Sidewinder can use LOAL (lock on after launch) because their sensors are so sensitive. The radar cues the seeker head prior to launch, so it knows where to search. Missile is launched, seeker head acquires target, boom.