There are several "proper" ways to do this. One way would be to have your snippet return its list of docids as a comma-delimited string, and use the snippet in a Wayfinder call
[[Wayfinder? &includeDocs=`[[MySnippet]]`]]
Or you could run your snippet before you run the Wayfinder snippet, and put the string of docids into a placeholder
http://rtfm.modx.com/display/revolution20/modX.setPlaceholder
[[MySnippet]]
[[Wayfinder? &includeDocs=`[[+docids]]`]]
You really don't want to have the Wayfinder snippet being run over again for each ID. Run it once with the full list of IDs your snippet gathers.
Rule #1 of snippets is don't use echo. Gather up your values into a variable and return that instead.
http://rtfm.modx.com/display/revolution20/Snippets
You could also use the runSnippet() API function if you need to run one snippet inside of another one.
http://rtfm.modx.com/display/revolution20/modX.runSnippet