If you're wetting your pants then wearing a diaper is a good thing as it keeps your pants dry and a wet diaper is better than having wet pants which is more embarrassing.
It's unlikely that anyone would notice your diaper at school as I have worn diapers to school before for fun and nobody said anything.
I remember when I was 8 years old I put a pampers baby diaper on that fit me good at the time and I wore it under my pants.
Nobody noticed that I was wearing the diaper or said anything about it.
However if you want to not wear the pampers at school you could remove the pampers in the bathroom and then place it in your locker or backpack and then put the pampers diaper back on before you go home.
However you will have to ensure you put the diaper back on good enough so that your mom doesn't notice you took them off.
Personally I would just wear the diaper as it also means you won't have to get up to use the toilet and can just pee the diaper whenever.
Here's a few pictures of a boy of about 8 years old named Tommy that was made to wear diapers and a shirt around the house.
In those days the diapers were thick plastic backed diapers and more noticeable but today diapers are hardly noticeable.