Could a triplane fly using a dihedral wing in the middle?
It would depend on the relationship between span and separation. The dihedral would be too great on a short-span wing, as drawn, leading to all sorts of issues. Since the separation needs to be more than usual, approaching two chord lengths, you would need a very high aspect ratio, maybe 15 or so.

But if you were to leave out the middle wing and cross-brace each side with thin wires, as a biplane it would be just as stiff and perform a heck of a lot better.