Compare Strings to get Unique values in Jinja2
Yes, this can be done. The following should do the trick:

"{%- for ip, az in seed.iteritems() %} 
  {%- if 'us-east-1a' in az %}
    {%- if firstloop is not defined %}
    {%- set firstloop = 1 %}
{{- ip }}
    {%- else %}
{{- " " + ip}}
    {%- endif %}    
  {%- endif %}
{%- endfor%}"


To test it with https://cryptic-cliffs-32040.herokuapp.com/, you can use the following JSON:

{
    "seed": {
      "10.18.13.12": "us-east-1a",
      "10.18.37.93": "us-east-1b", 
      "10.18.68.147": "us-east-1a",
      "10.18.21.55": "us-east-1b"
    }
}


You might give the documentation a read if you are going to be doing much jinja templating. I have found it indispensible.