Given a commutative ring $R$ and a distinguished triangle $X'\to X\to X''\xrightarrow e\Sigma X'$ in the derived category $D(R)$, where $X',X,X''$ are perfect complexes. If we have an equivalence $X\simeq X'\oplus X''$ in $D(R)$, is it true that the distinguished triangle is equivalent to the canonical split distinguished triangle $X'\to X'\oplus X''\to X''\xrightarrow0\Sigma X'$? Or equivalently, is it true that the extension map $e\colon X''\to\Sigma X$ is null-homotopic?

Maybe we can weaken the perfectness to almost-perfectness (in the literature, almost perfect complexes are sometimes also called pseudo-coherent complexes). I would like to refer to Lurie's Higher Algebra section 7.2.4 for the terminology.

I also wonder whether there are similar results for non-commutative rings, or ring spectra.

This is related to an old MSE post. In the case that $X',X,X''$ are discrete, there are several studies in the literature. For example, Guralnick showed that this is the case when $X',X,X''$ are finitely presented $R$-modules. On the other hand, a finiteness condition is necessary.