You can cook potatoes on the grill directly without the use of aluminum foil but you have to constantly turn them over to prevent them from burning on one side by being cooked too long.
Putting the potatoes in foil will allow the grill to more evenly heat and cook the potatoes so you don't have to turn them as often but it will take around 35 to 45 minutes for the potatoes to cook in foil on the grill and it will take around 15 to 20 minutes to cook the potatoes without the foil.