If there are no other requirements or restrictions, the only legal attack declaration is to attack with Khârn and no other creatures.
The two key rules for this are in the Declare attackers step rules:
508.1c The active player checks each creature they control to see whether it’s affected by any restrictions (effects that say a creature can’t attack, or that it can’t attack unless some condition is met). If any restrictions are being disobeyed, the declaration of attackers is illegal.
508.1d The active player checks each creature they control to see whether it’s affected by any requirements (effects that say a creature attacks if able, or that it attacks if some condition is met). If the number of requirements that are being obeyed is fewer than the maximum possible number of requirements that could be obeyed without disobeying any restrictions, the declaration of attackers is illegal. If a creature can’t attack unless a player pays a cost, that player is not required to pay that cost, even if attacking with that creature would increase the number of requirements being obeyed. If a requirement that says a creature attacks if able during a certain turn refers to a turn with multiple combat phases, the creature attacks if able during each declare attackers step in that turn.
Restrictions are absolute: no attack declaration is legal unless it obeys all restrictions. Requirements are a little more flexible: you must obey as many requirements as you can without violating any restrictions. So, restrictions take precedence over requirements.
Khârn's ability creates a requirement, because it says that Khârn attacks if able. Errantry creates a restriction, because it says that the creature cannot attack unless some condition is met. Errantry's restriction is obeyed either if the enchanted creature does not attack, or if the enchanted creature attacks and no other creatures attack. Khârn's attack requirement is obeyed if Khârn attacks. If there are no other requirements or restrictions, the only legal attack declaration is to attack with Khârn and no other creatures.
If there are other requirements or restrictions in play, you have to evaluate in that situation what attacks maximize the number of obeyed requirements without violating any restrictions.