The answer to the presenting question ("According to the original Greek, which "rock" is the word "this" actually being assigned to?") is simple, in grammatical terms: ἐπὶ ταύτῃ τῇ πέτρᾳ (epi tautē tē(i) petra(i)) "upon this rock" refers to Peter.

The Greek word πέτρα (petra) is one of the standard Greek words for "rock, stone", more "rock" than "stone", the other being λίθος (lithos) (more "stone" than "rock").

As Max Wilcox writes, in an important article for this question:

The plain meaning of v. 18 as it stands is quite simply that the Church (of Jesus) is to be built upon Peter.1

So the grammatical question is simple, and the immediate referent clear.2 But, as Wilcox immediately goes on to notice,

But elsewhere in the NT and in early patristic literature it is not upon Peter but upon Christ that the Church is built. Moreover, apart from this one passage, the 'stone' and 'rock' motifs from the OT are clearly applied to Jesus or to God. Why should it have been otherwise here?

And this is the deeper question to which the word "actually" in OP's forumlation points. Here things can get intricate and involved. In the history of the interpretation of this passage, two factors in particular come into play:

the Aramaic, kēphaʾ (but perhaps also the Hebrew), lying behind the Peter/petra wordplay, which comes into a related text, John 1:42 ('Jesus looked at him and said, "So you are Simon the son of John? You shall be called Cephas" (which means Peter).');

the editorial unity of these few verses, as some commentators argue that the basic scene has been elaborated by later tradition.

To unpack these would take this answer far beyond the time and space I have available; perhaps others will take up the story. To investigate further, do consult the material cited here (available in any decent seminary library). Also:

V.M. Armenteros, "A Rock in the Path: Possible Jewish Readings of Matthew 16:18", DavarLogos 8.1 (2009): 59-73 [PDF] - is a fascinating study of what it would mean to follow the "rock" imagery from the Hebrew Bible into early Jewish motifs, rather than that of early Christianity, but making sense of Christian traditions. (Easier to read than to explain in brief!)