It appears that yang-ide indexes all the Yang files it finds in all open projects, along with those found in Maven dependencies of the current project. The Yang components it finds in those modules (modules, types, et cetera) are offered as completion suggestions.
However, if you select a module (or type) from completion suggestions that isn't actually available for the yangtools compiler for this project (in Maven dependencies or the same project), then right after inserting that module reference, you'll get a red marker, saying it can't find that module (or type).
Completion suggestions should be limited to choices that are valid for the current module and project.