Sure, but I disagree when you’re selling that thing.
In a large society trust is necessary because you can’t know everyone. So I think it’s reasonable that at least if you’re selling something you can’t lie about it, including whether you wrote it or not.
And yes, I’m aware ghost writing is a long established practice and I think it’s always been deceitful.