... can the YN-565EX (my old flash) be used as a second flash (for example, to light up the background for portrait photography),
Yes. The YN-565EX can be a "smart" optical slave to the YN-568EX as a "smart" optical master. Keep in mind, neither of these flashes have built-in radio triggering, and if you would prefer to use RF (radio frequency) triggering rather than optical triggering, which can be overpowered by bright sunlight, you'll have to add TTL/HSS radio triggers to the feet of both flashes.
... when I use HSS with the D7200 and YN-568EX combo?
No. You cannot use HSS with the YN-565EX as a slave flash, because it still cannot do HSS. All three links in the chain: the camera body, the triggering system, and the flash, have to be able to do HSS for you to have HSS. It will work as a TTL slave, and should fire in sync with remote power/zoom control, though, if you use CLS "smart" optical triggering or add-on Yongnuo YN-622 radio triggers.
Or you could go with Godox and get HSS.
In the Godox 2.4 GHz system, the TT600, the Godox analog to the Yongnuo YN-560 III/IV models differs in two big ways: it can do HSS as a radio slave to a TTL-capable Godox transmitter. And it can work in concert with Godox's TTL-capable lights. It costs roughly the same as a YN-560IV.
All of Godox's speedlights have built-in radio transceivers so can be either radio masters or slaves. But you'll only get HSS/TTL if the on-camera master unit is TTL-capable. So you could get a TTL-capable TT685N and a manual-only TT600, and have HSS with both lights, and still have TTL with the TT685N if you use both as slaves to a TTL-capable transmitter unit, or you slave the TT600 to the TT685N on-camera.