Can a massless particle/object apply force on another body in Newtonian mechanics? I have a confusion regarding an assumption of massless pulleys and massless strings. It is assumed in various cases that the strings and pulleys are massless for simple calculations, and then forces are calculated by equations.
But can a massless body apply force on another body? If not, how does calculation on these pulleys and strings, assuming them massless, even make sense?
 A: 
can a massless body apply force on another body?

No, a massless macroscopic body cannot apply a force.

If not, how does calculation on these pulleys and strings, assuming them massless, even make sense

If the pulley or the string have mass, then this will mean you have to factor these in to calculate things like tension, which will result in a level of complexity beyond the current level of physics you are being taught.
To make things simple, and keep things consistent with the current level you are studying, we say that the pulley and string are massless, even though in reality, they clearly are not.  This is also similar to why in such problems, and many different introductory level physics courses, you are also told to ignore things like friction or energy loss to heat etc.
But if you do not make these simplifications, that will also add another layer of complexity beyond the current level you are being taught.
A: In reality there are no massless strings or pulleys. It could, instead perhaps, be said to ignore their masses to simplify calculations. And for what its worth a massless photon can apply motive force to an object, this is how a light sail works.
A: If you can define a momentum for a massless object despite it being massless, then it is okay, as Newton's law only requires that forces be equal and opposite, and force only affects momentum over time. A photon is an example of a massless thing which has momentum. The same applies for certain fields.
In practice, you treat certain things as massless because their mass is so small that it would not affect your answer to treat their mass as 0. That's an approximation, and does not require that those objects truly have 0 mass.
A: In my opinion, there is nothing wrong with masses strings and pulleys within the framework of Newtonian mechanics. Can it apply a force? Yes. Why? Because you say so.
So how does it work in real life? Well, contact forces are electrical in nature. Electricity and magnetism are not compatible with Newtonian mechanics. (Hence the original paper, "The Electrodynamics of Moving Bodies"). That means you need relativity. That makes the problem harder.
How do electrical forces apply force? It's the energy increase caused by overlapping atomic orbitals. Orbitals are non compatible with classical special relativity, you need quantum mechanics, field theory even. Now the problem has gotten harder.
You have acceleration in the problem (and gravity in pendulums and pulleys). Of course, that is also inconsistent without introducing general relativity.
You mass on spring is now has a changing quadrupole  moment. It must radiate gravitation radiation. The problem is getting very hard.
At some point, you may find a clash between GR and quantum theory. Now you need a complete theory of quantum gravity to solve you mass on a spring problem.
So the correct answer is: "This problem is intractable in the general case without a theory of quantum gravity".
Do not expect that answer to get full credit on the exam.
Enter: abstraction. This may be perhaps the most important skill in learning physics. What part of the problem can be treated abstractly, whether it's physically possible or not.
A classic example is the elastic collision. If you think about it carefully, you'll see that it is physical impossible for two classical objects to scatter elastically, it only works for in quantum mechanics (and then breaks when field theory adds internal radiative corrections).
Thus: to the extent that you are treating the problem abstractly in order to learn about force, energy, resonance, and so on: yes, massless strings apply force.
