Can I add handle ties to QO tandem breakers?
This is OK, as the manufacturer has a specific part for this job

Handle-tying the two inner half-breakers in a pair of (modern style) QO tandem breakers is legal, no different than handle-tying two full-size breakers save for a change in part number: instead of a QO1HT (the normal QO handle tie), you need a QOTHT instead (image from Square-D's product page):