It's certainly possible, but maybe not for the price you want
For example, most business class fares will let you book a segment into Y - not that you would want to, but you can.
If you're asking whether you can price a business and economy ticket end-on-end, the answer is once again maybe. Depends on the fare rules. Go look at ITA matrix and see what you can price out (inventory is usually wrong, so I recommend searching without inventory controls and then cross referencing against ExpertFlyer inventory).