Should all 4 players be allied with each other to win or is it enough to me to have 4 friends regardless the relations among partners?
You still must all be allied to win.
And what happens, if only 3 players remain in the game (2 AIs and me), and the others are my allied partners. Do I win the game immediatly or do we have to fight for the last standing player because the limit for allied player was set to 4?
The way you've phrased that isn't quite clear. An "allied victory" limit of four means that you cannot possibly win if there are five or more rivals left in the game. To win, the total number of surviving players (including yourself and the AI's) must be reduced to 4 and you must be allied with all of them.
Typically for a six-player FFA an allied victory limit of 2-3 is advisable. If you want to play a 4v2 with your friends against the AI's, I'd recommend locked teams.