I found the solution. In my case, the mod has the id 'colored_water' and one of the blocks is named 'glowing_water_green', and to fill with that block you use:
The mod is a Java archive (.jar). When you look inside the Java archive, you find .json-files for each block in the mod. In the .json-file, there is a name for the block.
Is it somehow possible to identify objects made by the user – that is, structures that weren't part of the world as created from the seed – in the save files and copy them from there?