It was not immediately clear where the boat had originated. Rights groups have said they are expecting many more refugees from Myanmar to attempt the dangerous sea crossings.
Fishermen in east Aceh, on the northern tip of Sumatra, brought two men, two women, and a child to safety while unconfirmed media reports said five others had died.
"They reached land at around 1.30 a.m. and were immediately taken to hospital," said Razali, a senior navy official based in eastern Aceh.
Tens of thousands of Rohingya fled Myanmar by sea following an outbreak of violence in Rakhine state in 2012. That exodus peaked in 2015, when an estimated 25,000 people fled across the Andaman Sea for Thailand, Indonesia and Malaysia, many drowning in unsafe and overloaded boats.
Last year, according to UN and other rights groups, some 700,000 Rohingya fled their homes in Rakhine into Bangladesh after militant attacks in August sparked a military crackdown that the United Nations and Western countries have said constitutes ethnic cleansing.
Buddhist-majority Myanmar rejects that charge, saying its forces have been waging a legitimate campaign against "terrorists" who attacked government forces.
Indonesia usually takes in asylum-seekers arriving by boat but they have limited rights and many end up spending years in refugee camps and detention centers.
Earlier this week, neighboring Malaysia intercepted a boat off Langkawi island carrying 56 Rohingya from Myanmar. .