Well, it may happen today, and it may even have happened back then that teachers would sometimes take credit for their student’s ideas, but no, if scholars today knew that a certain work traditionally attributed to Plato was really written by his student Carl, and if they did not have good reason to think it was really Plato’s ideas, and mostly his own words, as taken down by Carl, but really Carl’s own thoughts, then they would attribute it to Carl, not Plato. (Although they might, nevertheless, judge that it provided some additional insight into Plato’s thinking, on the assumption that Carl’s thinking would have been strongly influenced by his master.)
Incidentally, it should be said that there is really very little doubt, today, that the major works now attributed to Plato, the Dialogues, were indeed actually written by him, either by his own hand or dictated, so that the versions we now have are (allowing for errors that may have been introduced by copyists, over the ages) his actual words as he intended later generations to have them. (As has been mentioned, there are some doubts about the genuineness of some of the letters, but most of the letters are quite short anyway, and only a few contain anything of real philosophical significance.)
The situation with Aristotle is really quite different. Almost everything of his that we have was not intended for publication, but was originally lecture notes: either his own notes from which he lectured, or detailed notes as taken down by his students. When it is the latter, it does seem possible that some of the actual words and phrasing, and maybe even some of the examples, may not have been Aristotle’s own, even if we are reasonably confident that the actual ideas are his. Also, some of the works of Aristotle, especially the more factual ones, may have been collaborative efforts undertaken within his school, the Lyceum, compiling facts under his direction. (There are scholars who have argued that pretty much all of the works we attribute to Aristotle were really collaborative efforts, but I do not think this is a very commonly accepted view.)
We do, have some works (and evidence of the former existence of others) by Aristotle’s foremost student (and, probably, research collaborator), Theophrastus, who also became head of the Lyceum, after Aristotle died. Theophrastus did not pretend to be Aristotle, however, and wrote his own works under his own name.