וֶהֱפִֽיצְךָ֤ יְהוָה֙ בְּכָל־הָ֣עַמִּ֔ים מִקְצֵ֥ה הָאָ֖רֶץ וְעַד־קְצֵ֣ה הָאָ֑רֶץ וְעָבַ֨דְתָּ שָּׁ֜ם אֱלֹהִ֣ים אֲחֵרִ֗ים אֲשֶׁ֧ר לֹא־יָדַ֛עְתָּ אַתָּ֥ה וַאֲבֹתֶ֖יךָ עֵ֥ץ וָאָֽבֶן׃
און גאָט װעט דיך צעשפּרײטן צװישן אַלע אומות, פֿון עק ערד ביז עק ערד, און װעסט דאָרטן דינען פֿרעמדע געטער, װאָס דו און דײַנע עלטערן האָבן ניט געקענט, האָלץ און שטײן.
Rashi
ועבדתם שם אלהים אחרים AND YE WILL SERVE THERE OTHER GODS — Understand this as the Targum does: (ye will serve the peoples that worship idols); not actually that they shall serve idols, but they will have to pay tribute and poll-taxes to the priests of the idols.
Siftei Chakhamim
Not literally idolatry, etc. Because it is impossible to say that the Holy One is informing them that they will serve idolatry.