If you want to edit the map service's data source using IMapServerDataAccess.GetDataSource, your map service's data source needs to be in a registered enterprise geodatabase (you don't have to check the Feature Access capability though).
If your map service's data source is from a file geodatabase, registered folder, or copied to server, then the service's data is not editable via SOE/SOI, because the service itself in this case is read-only and not editable, and so is the service's data source/workspace.
However, you can edit data (such as a file gdb feature class) in SOE/SOI via direct access to the data through WorkspaceFactory (such as IWorkspaceFactory.OpenFromFile), instead of the service access (IMapServerDataAccess.GetDataSource). In this scenario, your arcgis server account must have permission to access the data (such as the .gdb), in other words, the data must be at a location where server account has permission to access.