Yes
Yes, you can forgo the additional attack from Horde Breaker and use Commander's Strike.
Horde Breaker says:
Once on each of your turns when you make make a weapon attack, you can make another attack with the same weapon against a different creature that is is within 5 feet of the original target and within range of your weapon.
and Commander's Strike says:
When you take the Attack action on your turn, you can forgo one of your attacks and use a bonus action ...
You take the Attack action meeting the first criteria of Commander's Strike. You make the attack while another creature is within reach of your weapon and 5 feet of the target meeting the criteria for Horde Breaker. You gain an additional attack which is not a bonus action so must still be under the umbrella of the Attack action (not that this is a requirement). You forgo that attack meeting the second criteria of Commander's Strike and use your bonus action meeting the third.
Well spotted.