Track row origin in MySQL multi source replication
Are the rows going into the same table(s)?  If so, your suggestion of an extra column from the Master is probably the only way.

Or are the rows going into different databases (or tables)?  If so, then nothing is needed -- the different dbs/tables provide the clue.

Another approach may be "replicate rewrite" -- this turns same table into different table.  If you then need to "combine" the data (on the unified Slave), use UNION ALL and/or a VIEW.  See here.