The easiest solution is that your "Done" (dismiss) button is not displayed while editing, so that it looks like this:
Not editing: ....[Edit][Done] <- (Done-dismiss)
Editing: ..............[Done] <- (Done-editing)
Another thing you can do is set the "Done" (editing) button on the left side (as well as hiding the "Done" (dismiss) button), so that the user notices it's a different type of "Done"
Note: From a UX point of view, showing two "Done" buttons that look identical on the same view at the same time is very wrong, even if they are in different positions