After rethinking the problem the solution seems to be quite easy. I just have to check if its currently shallow water, deep water, or land fill. If its any of these three tiles at the moment, it is a "original water" tile.
And if someone wants to place a new water tile there has to be shallow water, deep water or land fill tile within 5 tiles radius.
This way the waterfill mod cannot be misused anymore to cut off whole island areas with enemies for easily taking over the ressource rich part of an island. But still you can enjoy landscaping (in a limited way) to edit shore lines for example.
Technically the function count_tiles_filtered{} looking for "water-shallow", "landfill", "deepwater" with radius 5.0 should by > 1 to allow placement of waterfill.