Hello Bahadir
Yes, you can. Simply make sure you activate your pass before you board the first public transport service, and you do show your physical passport or identity card together with your Interrail pass at every single ticket check.
Furthermore, you have to change trains at Lucerne.
Be aware that Lungern is one of the tourist hotspots in our country, massively suffering from mass tourism. You won’t be the only one there, and locals ask tourists to respect their privacy.
Kind regards,
Roland