I'm afraid that is not possible, at least not from inside an editor.
Graphiti uses EMF Transactions so every change to the model must be done in
a transaction which is recorded and ends on the command stack. Chaging the
model from inside an editor omitting the transaction will cause an
exception.

You may of course do that outside if the editor using your own means to
load, modify and save the EMF model.

yes, this can also be done inside a custom feature. Retrieving the objects
might be tricky depending on your object hierarchy. You will have to
browse/navigate through it (possibly starting from the object the custom
feature is registered for or the diagram/your root object).