Update url query upon form submission I am trying to append a variable on the URL through a custom submit function. Is that possible? 

My issue is that I am coming to the node/%/delete from different pages. I want to modify the delete form if the user comes to it from the node/%/edit. How can I detect this?

As @Clive suggested I'll try to add a query param in the following structure:

actions (Array, 5 elements)
  #type (String, 7 characters ) actions
  submit (Array, 5 elements)
  preview (Array, 5 elements)
  delete (Array, 4 elements)
    #type (String, 6 characters ) submit
    #value (String, 6 characters ) Delete
    #weight (Integer) 15
You should use the hook_node_access in your custom module. 

For Example - 

/**
 * Implements hook_node_access().
 */
function MODULE_node_access($node, $op, $account) {

  if ($op == "delete") {
    // If no user object is supplied, the access check is for the current user.
    if (empty($account)) {
      $account = $GLOBALS['user'];
    }
    // You can add your own condition check here...
    return user_access("delete content", $account) ? NODE_ACCESS_ALLOW : NODE_ACCESS_DENY;
  }

  return NODE_ACCESS_IGNORE;

}