could it be "huszonegy orvos itt dolgozik"?
Sure, for example, as part of a comparison. As in "21 doctors work here, and another 12 there".
why wouldn't you use the plural of doctor - orvosok?
Because the number already shows that there is more than one doctor, so you don't need an ending on the noun to show that again.
Hungarian uses the singular form of nouns after numbers and similar quantities such as sok "many".
Wouldn't "Itt dolgozik huszonegy orvos" be correct?
Yes, it is a valid sentence.