Yes, iloc can be used to modify a subset of a DataFrame by assigning new values to the selected elements. By providing specific row and column indices, you can update the desired portion of the DataFrame.