Yes, it's perfectly fine.
Both by RAW, and Rules As Interpreted, it makes logical sense:
RAW:
Defensive Duelist
Prerequisite: Dexterity 13 or higher
When you are wielding a finesse weapon with which you are proficient and another creature hits you with a melee attack, you can use your reaction to add your proficiency bonus to your AC for that attack, potentially causing the attack to miss you.
As stated in other answers, RAW says as long as it has the finesse tag, you can use defensive duelist.
Rules As Interpreted:
Instead of worrying about the potential for parrying with a dart, consider that the limitation to finesse weapons is likely in part due to the weight. All of the finesse weapons weigh less than or equal to 3 pounds. You don't have to block an attack for it to not cause damage, and based on the text in the feat, it even specifically states that it is "potentially causing the attack to miss you." So consider that the finesse requirement exists so as to allow for classes like Monk to have both melee and ranged weapons in which they can utilize a way to gain an AC bonus on their reaction. After all, a monk gets this bonus simply by holding a dagger, and he/she doesn't ever have to actually do any damage with that dagger thanks to their ability to substitute their unarmed damage instead.
As an interpretation goes, Defensive Duelist does not emphasize parrying but rather avoidance. As such, the ability to block is completely irrelevant as the focus is on dexterous reaction, especially considering that the feat is triggered as a reaction.