Yes, a sentence can end with “for” (e.g., “I don’t know what this tool is for”). In the past, writers were encouraged not to end a sentence with a preposition (e.g., “for,” “to,” “about”), but this guidance is outdated.
Sentences and clauses frequently end with a preposition when the object of the preposition is a relative pronoun (e.g., “whom,” “what”).