No, it is not possible.
Assuming that $A$ is an $n\times n$ upper (or lower) triangular matrix whose diagonal entries are $d_1,\dots, d_n$.
We can perform a series of row operations on $A$ which consists entirely of adding a multiple of one row to another row. This operation does not change the determinant of $A$.
If we have $d_i=0$ for some $i\le n$, then the row operations would give us a row which consists entirely of zeroes, hence $\det(A) = 0 = d_1 d_2\dots d_n$.
If we $d_i\ne 0$ for all $i\le n$, then the row operations would give us a diagonal matrix whose elements on the diagonal are still $d_1,\dots,d_n$. Obviously, the determinant of the diagonal matrix is $d_1 d_2\dots d_n$, thus we have
\det(A) = d_1 d_2\dots d_n
in either cases.