By the time we reach the end of Act IV, Ophelia has gone quite mad. She has made a number of comments that seem to have a hidden truth in them and has presented Leartes and the king and queen with flowers (either real or imaginary) that also have significant symbolic meaning.
At the point in the play that you referenced in your question Ophelia, is of course, drowned. Yet much speculation remains about the details of her death. Gertrude reports that she fell into the brook and that her clothes became heavy with water and pulled her under. She also stated that while Ophelia was drowning, she seemed oblivious to her plight. Instead of calling for help, she "chanted snatches of old tunes / as one incapable of her own distress." It was as if Ophelia did not know what was happening to her. This description might support Ophelia's accidental death as a result of her madness.
However, later, at the burial site, the two grave makers are discussing Ophelia's death. Many people in the kingdom obviously believe, based on this conversation, that Ophelia did not drown by accident, as the official story goes, but rather that she drowned herself.
Even the priest questions her Christian burial, since suicides are not supposed to be laid in hallowed ground.
If one is to examine the symbolic meanings of the flowers she makes wreaths with before falling into the brook and the flowers she presents to the royals, Leartes and herself, (Remember, she gives herself RUE) then the question over whether her death is suicide or accident becomes even more significant.
Huntington Botanical Gardens has a web page devoted to the symbolism in Ophelia's flowers. You can check out the link to that page below.