It appears that Luther did in fact say something to that effect. In one of his Table Talks, Luther is recorded as saying:
I don’t share the opinion that suicides are certainly to be damned. My reason is that they do not wish to kill themselves but are overcome by the power of the devil. They are like a man who is murdered in the woods by a robber. However, this ought not be taught to the common people, lest Satan be given an opportunity to cause slaughter, and I recommend that the popular custom be strictly adhered to according to which it [the suicide’s corpse] is not carried over the threshold, etc. Such persons do not die by free choice or by law, but our Lord God will dispatch them as he executes a person through a robber. Magistrates should treat them quite strictly, although it is not plain that their souls are damned. However, they are examples by which our Lord God wishes to show that the devil is powerful and also that we should be diligent in prayer. But for these examples, we would not fear God. Hence he must teach us in this way.
I'm not sure what he means by "magistrates should treat them quite strictly", but there may have been legal consequences for the family of the suicide.
This is the only appearance of any discussion of suicide I can find, several years after Luther left the Catholic Church. I don't see any evidence that he made the sorts of statements while he was a monk.