You could use Ant's script task to access the underlying Java libraries using JavaScript. JavaScript is available in the JRE since 1.6 so no extra dependency is needed.
<property name="mydup.prop" value="x,Xx,y,y,z,x,a,x" />
<target name="main">
<echo message="${mydup.prop}" />
<script language="javascript"><![CDATA[
var unsorted = project.getProperty("mydup.prop");
var unique = new java.util.ArrayList(new java.util.HashSet(java.util.Arrays.asList(unsorted.split(','))));
java.util.Collections.sort(unique);
var result = org.apache.tools.ant.util.CollectionUtils.flattenToString(unique);
project.setProperty("myout.prop", result);
]]></script>
<echo message="${myout.prop}" />
</target>
If you do not need sorting you can omit the line java.util.Collections.sort(unique);