Yes you can write on glass with dry erase markers and the dry erase marker will wipe right off the glass using a paper towel or dry erase marker eraser.
I use dry erase markers to write things on glass all the time and it always come off really easy.
You can buy markers made especially for writing on glass by dry erase markers work okay on glass as well and it's easy to clean it off.
When you're ready to remove the writing from the glass after using a dry erase marker just grab a wash cloth or a paper towel and it will wipe right off.
You can then use some soap and water or vinegar to clean any residue leftover from the dry erase marker.