Probably obvious but I cannot find a straight answer. If I have a valid prescription from a doctor in one country, can a pharmacy in another country dispense against it?
Generally no, and it varies by country. Most EU states require a prescription issued by a prescriber registered there, or apply a specific recognition rule for cross-border prescriptions which is narrower than people assume. A foreign prescription is usually a piece of paper with no legal force at the destination.
US: a foreign prescription is generally not valid for dispensing in the US. Some pharmacies will accept one as a basis for contacting a US prescriber, which is a different thing.
So the whole “I have a script” defence does not travel.
Correct. It travels as evidence of clinical need, not as authority to dispense.