Is 1 Corinthians 4:6 a possible defense for sola scriptura?
I have applied these things to myself and Apollos for your benefit, brothers, so that you may learn from us not to go beyond what is written, so that none of you will be inflated with pride in favor of one person over against another (1 Cor. 4:6).
The problem with the community in Corinth is that they were constantly falling into the practice of combining Christian and pagan practices. Paul spends much of his letters to them correcting their abuses. The fact that he might demand they make no assumptions beyond what is written down for them should come as no surprise.
In 2 Thessalonians 2:15, Paul has no problem permitting that community to go from memory on what he has said rather than only what the has written, so his words to Corinth could very well be a clamping down on abuses.
It has been proposed by some scholars that "do not go beyond what is written" is an idiomatic expression which simply means "follow the rules."
Another issue with seeing this as a sola scriptura reference is that the expression "what is written" is usually a reference to the Old Testament (1 Cor 1:19, 1:31, 3:19-20) and thus if taken literally would render the New Testament as non-Scripture.