Is this sentence grammatically correct?
It is irksome when some colleague inflicts their tasks on you by telling you about his more urgent tasks.
The person in question is a male, but still this construction seems a bit awkward. Is it acceptable at all?
This sentence uses the singular they, which is often used when mentioning a person whose gender is unknown, irrelevant, or both. This is correct usage.
Many years ago, style guides recommended using the generic he when referring to a person of unknown gender. Even today, some people will tell you that the singular they is incorrect. It is not incorrect.
However, it is incorrect to use they in the first part of the sentence and he later on. Whether you use they or he, you should be internally consistent.