While it is possible to train your cat to flush the toilet it is not recommended.
Some cats find flushing the toilet much too fun and will flush even when they didn't use it.
... As a result there will be waste in the toilet which may potentially make your bathroom smelly.