From the players handbook, a weapon is either melee or ranged.
A trebuchet is obviously not a melee weapon, therefore it must be a ranged weapon.
A sneak attack must be made with a ranged weapon or a weapon with the finesse quality.
Now, not all "ranged weapon attacks" which all siege weapons are listed as doing are ranged weapons. See the handaxe as it can be used to make a ranged weapon attack but it is not a ranged weapon. So maybe siege weapons are another group of weapons outside of the melee/ranged categories since they appear in the DMG, but that is never spelled out clearly. So maybe you can make sneak attacks with siege weapons.