The company devised the solution with help from both the Substance Abuse and Mental Health Services Administration as well as the Partnership for Drug Free Kids, and describes it as a balance. While there are shady dealers using hashtags to sell drugs through Instagram (already against the service's policy), simply blocking the hashtags could disrupt support networks. This provides them with a ready-made support option without cutting off existing help (or, for that matter, ensnaring people conducting research).
The feature will be visible in the US as of September 12th, with an international rollout coming "soon."
Instagram's pop-up is arguably coming late given the length of the opioid crisis, but it does show that Facebook is tackling drug abuse across multiple platforms, not just its main audience. Not that it necessarily had much choice. The photo-centric service has over a billion active users, so even a simple alert like this could affect millions of people.