The report also shows that less than half of the students knew who the sender was, and only a quarter had asked for it.
The research, presented at the annual conference of the Association of Scottish Principal Educational Psychologists, was collected from an online survey of 800 students in Fife.
The study found that 38% of students in S3 had received inappropriate messages, as well as 14% of students in S1, aged as young as 11.
Alarmingly, only 63% of the young people surveyed said they would turn to people for support if things went wrong, and an image they had sent went public.
Experts have said that the sending of inappropriate messages, often called “sexting”, can lead to “cyberbullying” for the senders, as well as “serious anxiety”.
Parents have urged schools to do more to combat the practice.
Euan Duncan, president of the Scottish Secondary Teachers’ Association, explained the risks that sexting could pose for students.
He said: “I have been aware of distressing circumstances when youngsters have made mistakes online, and also when sexting has been used as a vehicle for nasty cyberbullying.
“Of course this can be a cause of acute embarrassment and serious anxiety.
“In my experience teachers involved in pastoral support and school leadership have had to develop confidence in handling this particular issue which suddenly came to the fore a few years ago with the advent of sophisticated smartphones, wifi and cheap data plans.
“As long as young people understand the significant risks and possible legal consequences of sexting then they are in a good position to stay safe.”
Eileen Prior, executive director of the Scottish Parent Teacher Council pointed out the importance of schools working to tackle sexting.
She said: “Our perspective is that it’s important for families and schools to work together to make sure there is a consistent message and shared approaches.
“You can’t simply say, ‘that happens outside the school gates so we can’t deal with it.’
“This is a health and wellbeing issue which can’t be ignored.”
It is illegal to send, receive, or possess an inappropriate image of someone under the age of 18, even if the picture is of the person sending the image.
It is also illegal to send inappropriate images to anyone under the age of 16.