You seem to be completely ignoring packages, which is a big mistake. The answer depends on whether the "extension which is already present" is in your package or not.
You can modify elements (including extensions) that are in your package. You can't change code in packages developed by other parties, such as Microsoft or ISVs. You can only extend them, which is the point of extensions.