I think it's a very strong possibility but it's not the only explanation.
John 21 does appear to be a post script to John's gospel. John 20:30-31 is certainly a fitting conclusion to the gospel proper.
30 Jesus performed many other signs in the presence of his disciples,
which are not recorded in this book. 31 But these are written that you
may believe that Jesus is the Messiah, the Son of God, and that by
believing you may have life in his name.
Other issues also point to John 21 being a later addition to the fourth gospel. For instance Jesus' three questions to Peter, "do love me," appear to point to an original knowledge of the Gospel apart from John 21. In John 21, Jesus' uses the word ἀγαπάω (agape) for love twice followed by φιλέω (phileō) in his questions to Peter. These questions are followed by a discussion between Jesus and Peter about the disciple whom Jesus loved (21:20-22). And interestingly enough this is the same pattern we find used in the beloved disciple three appearances before John 20:30-31.
13:23 One of them, the disciple whom Jesus loved (ἀγαπάω agapaō), was
reclining next to him.
19:26 When Jesus saw his mother there, and the disciple whom he loved (ἀγαπάω agapaō)
standing nearby, he said to her, “Woman,[b] here is your son,”
20:2 So she came running to Simon Peter and the other disciple, the
one Jesus loved (φιλέω phileō), and said, “They have taken the Lord out of the tomb,
and we don’t know where they have put him!”
In fact much of John 21 focus' on Peter and his relationship to the disciple whom Jesus loved. It has less to do with Jesus. This is certainly evident in in the three and possibly four appearances of the disciple before John 20:30-31 but its certainly more pronounced in this last chapter.
With the addition of John 21 this apparently implicit connection is not as clear. This disciple is mentioned twice in this later chapter (21:7, 21:20) which dilutes the three appearances in the Gospel's main body. But if John's gospel had been known first without chapter 21 then Jesus' three questions to Peter when the chapter was later added would most certainly have been associated with the first three appearances of the Beloved disciple.
The author of John 21 also wants to correct a faulty belief about the lifespan of the "disciple whom Jesus loved, who we are told subsequently is the author of the fourth gospel.
22 Jesus answered, “If I want him to remain alive until I return, what
is that to you? You must follow me.” 23 Because of this, the rumor
spread among the believers that this disciple would not die. But Jesus
did not say that he would not die; he only said, “If I want him to
remain alive until I return, what is that to you?”
It's certainly possible that John 21 is added as post script to champion the testimony of the beloved disciple in relation to the more well known Peter in either the wake or the proceeding moments before the beloved disciples death.
But with that said. There is an allusion to the ending of Ecclesiastes here. John may simply be making an intentional allusion. Robert Kashow has recently laid these comparisons out in his article Traces of Ecclesiastes in the Gospel of John: An Overlooked Background and A Theological Dialectic. Note the similarities in the way the two books end.
