Keep in mind that the agent may have just been trying to impress upon you the complexity of ticketing rules and not intended to be rude.
ITA finds the cheapest YYZ-PEK-BKK-YYZ fare using three fare segments. Looks like either it can't be done as two, as the agent said, or it's not worthwhile to.