Conventional channel coding/decoding
Yes, it is possible to determine the path that the Viterbi algorithm found through the trellis. Just apply the encoding algorithm to what you are calling Y_dec and you will get the corresponding codeword of length $2048$. You can then compare it to Y, the transmitted codeword, to see where the channel made errors.
Additional notes:
If the data to be transmitted 1024 information bits and the code to be used is a half-rate $(2,1)$ convolutional code with constraint length $7$, then the convolutional codeword produced by the convolutional encoder is $2060 = 2048+12 = (2\times 1024) + 2\times 6$ bits long where the extra $12$ bits are produced by the encoder as zeroes are pumped into the $6$-bit-long data buffer as the buffer empties out. I don't speak MATLABian gobbledygook at all and so don't know what Y_dec(1+tblen:end) means, or indeed why tblen is involved at all.  If  Y = convenc(X, trellis) produces a codeword vector Y of 2060 bits, then
Y_dec = vitdec(Y, trellis, tblen, 'cont', 'hard') should produce X again. I don't see where there was any noise involved and so the Viterbi decoder should just zoom through the trellis following the same path as the encoder so that Y_dec should equal X. If there is noise, then Y_dec should be the same as X in most of the 1024 bits except for some bursts of errors in that span. In this case, convenc(Y_dec, trellis) will not be the same as Y, but in the absence of any channel errors, Y_dec=X and  convenc(Y_dec, trellis)=convenc(X, trellis)=Y.