I was chaining the ditto for breeding purposes, but the best ditto I've gotten was 4IV ditto. So, I'm wondering whether its really possible to get a 6IV one?
No chain length will guarantee a 6 IV encounter. The most perfect IVs you can guarantee with the chaining method is four, which is achieved with the 30th chain. After that, any further perfect IVs (i.e. a fifth or sixth) are at the mercy of RNG.
Due to how the game implements the perfect IV bonus, you chances of finding a 6 IV Pokemon are no better for having guaranteed four perfect IVs already. Your chances of finding a 6 IV Ditto are in the vicinity of one in a billion.
If you have a Gen 4 or 5 Pokemon game, you can get a 100% legal 6 IV Ditto through RNG abuse and then transfer it to your game. Gen 4 RNG in particular is quite approachable (video demonstration), and I recommend using it if you really want a breeding Ditto. Otherwise, Pokemon subreddits and Discord servers, especially /r/morebreedingdittos, are the best places to find a (likely hacked/cloned) 6 IV breeding Ditto.