In the spirit of this forum I shall not be addressing the question of whether the “historic” Jesus was historically crucified historically naked, but shall limit myself to the question of whether the author of John implied such a situation.
The text of John 19:23 reads as follows:
Οἱ οὖν στρατιῶται, ὅτε ἐσταύρωσαν τὸν Ἰησοῦν, ἔλαβον τὰ ἱμάτια αὐτοῦ, καὶ ἐποίησαν τέσσαρα μέρη, ἑκάστῳ στρατιώτῃ μέρος, καὶ τὸν χιτῶνα. ἦν δὲ ὁ χιτὼν ἄραφος, ἐκ τῶν ἄνωθεν ὑφαντὸς δι’ ὅλου.
There are no significant textual variants in the Greek manuscripts, though there are a couple of bad spellings in a few manuscripts. From the point of view of Greek grammar this is perfectly transparent. The verb ἔλαβον (they took) is followed by two direct objects in the accusative case: τὰ ἱμάτια (the outer garments) and τὸν χιτῶνα (the undergarment). There is no way that καὶ τὸν χιτῶνα could mean “with the undergarment remaining”. This is not a translation, but a paraphrase of what the authors of the NIV think the verse ought to mean.
It might, however, interest you that the Syriac translation (Pshitta) actually omits the words “and the undergarment”. The verse reads (with Western Syriac vocalisation):
ܐܶܣܛܪܰܛܺܝܽܘܛܶܐ ܕ݁ܶܝܢ ܟ݁ܰܕ݂ ܙܰܩܦ݁ܽܘܗ݈ܝ ܠܝܶܫܽܘܥ ܫܩܰܠܘ ܢܰܚܬ݁ܰܘܗ݈ܝ ܘܰܥܒ݂ܰܕ݂ܘ ܠܰܐܪܒ݁ܰܥ ܡܢܰܘܳܢ ܡܢܳܬ݂ܳܐ ܠܚܰܕ݂ ܡܶܢ ܐܶܣܛܪܰܛܺܝܽܘܛܶܐ ܟ݁ܽܘܬ݁ܺܝܢܶܗ ܕ݁ܶܝܢ ܐܺܝܬ݂ܶܝܗ ܗ݈ܘܳܬ݂ ܕ݁ܠܳܐ ܚܺܝܛܳܐ ܡܶܢ ܠܥܶܠ ܙܩܺܝܪܬ݁ܳܐ ܟ݁ܽܠܳܗ ܀
Literally: But the soldiers, when they had crucified Jesus, took his garments and made four parcels of them, a parcel for each of the soldiers. But his tunic was without seam from the top, woven throughout.
This is probably the result of a haplography (the archetype had the word kuttīneh ‘his undergarment’ twice and a scribe inadvertently jumped from the first to the second).
Even with this reading, the continuation of the text states that the soldiers did remove the undergarment and cast lots for it. Of course, the text says nothing about a loin cloth.