It is but traditionally it has been used externally applied as a poultice or a bath. Ditch weed is fine, it doesn’t need to be dope-grade flower buds.
I really doubt any poultice would touch the pain killing power of opiates