First, the Prime Directive should not apply. They picked them up rather than let them die in their ship. Moreover, they gave the diagnosis of their technological problems without any Prime Directive problems; diagnosing their health is no different. Indeed, as long as the concept of addiction existed in their culture, their should be no Prime Directive issues. Nothing requires them to share technology or science in order to provide the diagnosis. Crusher did not even use exotic technology to come to her conclusion, just observation.
Second, and this is where the morality of the episode comes into question, the diagnosis belongs to the patient, not to the public. Once Crusher determined that there was no issue with contagion, she had no business withholding it from the patient and no business spreading the information willy-nilly around the ship. We never get a full picture about how the Federation conceptualizes the individual or what her/his/its rights are, but the suggestion is that they are at least an improvement upon what is enjoyed in "the western world." Patient's bills of rights have been the governing documents of hospital associations since the 1970s, including the rights of patients to complete information about their conditions. Why would the Federation walk this back? Why would the Prime Directive moderate this? Once they are in a position to be diagnosed, their should be no further issues. Furthermore, withholding the diagnosis at least implicitly supports a lie. What did Picard say about first duty of Starfleet officers to truth? Even saying that they are not dying from the plague would be better than what she, via Picard's orders, did.