She played an important role in the drama.

Literal

She [topic-は] that drama [in-で] important role [object-を] played.

演じる ('to perform, play, act out a role') is the dedicated verb for stage and screen acting. The で here marks the venue or context of performance — 'in the drama', not 'at the drama'. ドラマ as a katakana loanword in Japanese specifically means a TV drama series rather than a stage play (which would be 演劇 or 劇), drawing on the long-standing Japanese television-drama tradition that runs the gamut from morning serials (朝ドラ) to evening primetime to taiga historical epics.