Giving line decorations a max-width

Is it possible for a line decoration to have a max-width that is different to other lines in the editor? Line wrapping would be enabled in this context.

I’m prepared to put in the effort to make it work, provided it is theoretically possible and not a complete waste of time

… maybe? The selection would look wonky with this, at least, I’m not sure if it breaks anything else.