ArcGIS Pro 2.6 API Reference Guide
CanEdit Method (IMetadata)
Example 

ArcGIS.Desktop.Core Namespace > IMetadata Interface : CanEdit Method
Indicates if metadata is editable for the item.
Syntax
bool CanEdit()
Function CanEdit() As Boolean

Return Value

true if the metadata can be edited
Example
bool canEdit1;
//Call CanEdit before calling SetXml
await QueuedTask.Run(() => canEdit1 = metadataItemToCheck.CanEdit());
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

IMetadata Interface
IMetadata Members