I read the answers and I have a feeling there is some little insight you should be aware of.
Investigate. What is the source of a cowboy coding behaviour?
As a manager you are supposed to know your team(s) and peoples motivation. One of the possible problems was mentioned by @JeeseJeese and it may be the most probable one. But please remember that in order to find proper solution you should be sure what you want to cure.
(alternate motivations: cowboy like to show herself in a good light / she is a creative person / she cares for the users more that product owners / your organisation lacks care for inventions and she finds it the only way to introduce some / etc.)
Make it a win-win
@JeeseJeese also said a very important thing: If they have "ideas" you should encourage that they bring them forward but not blindly code them into the story.
It may be that there is nothing wrong with the task scope, but the coder is a very highly creative person. The worst thing would be dumping her joy of work and her creative output. You could not stop creativity, it will happen not matter what. But she can create other stories for the ideas and separate the current work from additional improvements.
Measure and decide
@DavidDavid said important thing: Good things could come from a rogue human resource but many bad things will come from him
... and I would add that: probably many good and bad things are already coming from her.
Over a time you should decide if your total ballance is a possitive or negative one. You are the one to decide if you have a time for making it win-win in your project's situation. What are the costs of the problem, is there a good outcome and what are the forecasts?