It would be possible to say "This is a tree but not a flower" if someone were really having a difficult time distinguishing between a tree and a flower. It's not otherwise really necessary to use "but" to show contrast here because the difference between a flower and a tree is obvious. This difference might not be obvious, however, to visitors from another planet who may not have ever seen anything at all like "plant life". Maybe it's all the same for them, so we might say "You see? This is a flower, and this is a flower. Now this grows from the ground just like a flower and needs water and sunlight. Because it's big and has many branches, it's a tree, but not a flower. Flowers, you see, are much smaller and don't last as long."
This is a tree, but not a flower. = This is a tree, but it is not a flower.
If it's wrong, then, to me, it's wrong only because it's not logical to ordinarily contrast a tree and a flower.
The other sentence you asked about is just wrong. It doesn't make sense. I wouldn't think about that one.
