Can you convert a Master-Detail relationship to a Lookup if it's referenced in code?
Turns out I'd overlooked something: there was a deleted roll-up summary still in the deleted fields section of the Account object.
Deleting that allowed me to change the field's type without modifying code and without deleting the field or losing data.