There are 3 main things used to define a ribbon cable: length, number of conductors, and pitch (distance between each conductor). For most uses, the length is the least important aspect, it just needs to be long enough. If you get a replacement part that has the same cable, but just longer, then it should just work assuming you have enough space to squeeze it in. If it's not long enough, but has the right pitch and number of wires, you can still remove the original cable and solder it to the new motor. If it doesn't have the right pitch, you can splice a bit of the old cable onto the new cable (just be careful to not create short circuits).
Based on the images from the linked answer, it looks like both your motor and the similar one you refer to have 13 wires in the ribbon. Given that the pitch is fairly standardized for these types of cables, it's likely that they're the same, except maybe for length.