Rescuers in Indonesia saved more than 560 people from a packed ferry that caught on fire at sea, but there were casualties.