Yes, absolutely.
There are only a few, certain, quests that are solo only.
Your friends first one will be at level 15 for his class quest
There is nothing in the game stopping you from grouping at any level difference
And if the mobs are grey to you, you won't get any of the xp but your friend will
You could also invest in the Stone of the Tortoise.
To further prevent you from getting any xp
Core P9 | ROG Crosshair VII Hero | AMD Ryzen 7 1800X | 64Gb RAM | RX 5700 XT 8Gb (x2) | LG BD-RE | 512GB Samsung 960 PRO M.2 NVMe SSD | Win10 Pro | WEI - 9.8