It is commonly understood that all apostles, their successors and those to whom they delegate can bestow the Holy Spirit.
Besides Peter and John, as you mentioned, Paul and Barnabas, who was also considered to be “apostles”, were also baptizing and confirming. This was only mentioned explicitly for Paul when he visited Ephesus in his third mission (Acts 19), but it can be deduced from the fact that Paul and Barnabas founded so many churches in their first mission, which would be impossible without the outpouring of the Holy Spirit upon these new believers. This is extended to all the apostles. That they were not mentioned in Acts does not mean that they could not confer the Holy Spirit.
But going back to the passage regarding the deacon Philip in Samaria. This is a bit of an anomaly, since certainly it cannot mean that people can be baptized in the Lord without also receiving the Holy Spirit. Biblical scholars in general came to understand this in one of two ways: (1) that this refers not to the absence of the Holy Spirit but to the absence of the manifestation of the Holy Spirit, or (2) that this episode was allowed to emphasize the necessity of the apostolic authority in conferring the Holy Spirit.
In either case, it is understood that since this episode, something must have happened to fix it. Baptism itself confers the Holy Spirit, but only the apostles and their successors the bishops and those to whom they delegate, can confirm with the seal of the Holy Spirit.