Stair tread partial repair
Yes, this type of repair can certainly be done with good results. 

Remove the carpet and cut away all compromised wood. Now fasten cleats under the edges of the cuts wherever support is available, lapping under the remaining tread and into the repair area, using screws and heavy-duty construction adhesive. Drop in your repair piece and fasten it the same way. Once the adhesive is cured it'll be as one board. 

Also take the opportunity to add screws and adhesive to any accessible points of contact between boards. This will stiffen the stairs and prevent noise.