If an expert of some kind travels back in time to the 14th or 15th century with modern tools and machines that don't require power to work and if he were to past on the knowledge of modern technology to a group of experts from that timeline, could they build an inline engine for use in vehicles and aircrafts? Also, with the knowledge they obtained and the tools and machinery, could they build a helicopter instead if the plane doesn't work?
There are too many missing technologies
There are several technologies critical to an inline engine that would not have been easily replicated in the 14th century of thereabouts
High quality metal. The block (and cylinders and cylinder heads and bolts, etc) are under high temperature and pressure stress during operation. Metals at the time might not have been able to handle the stress; at least, given the uneven quality of production, not all engines would work. You'd need to wait at least until the development of mass produced iron cannons in the 17th century, possibly until the steel-making changes of the First Industrial Revolution around 1800.
Fuel. The technology to refine crude oil into a useful gasoline by product didn't really exist. Neither does a suitable lubrication oil You would have to get an entire petrochemical industry off the ground by yourself.
You can't make the parts. The crankshaft (along with a cam) is necessary to control the timing of the pistons. That wasn't used widespread in Europe until the 15thc century. Valves and valve springs haven't been invented either. Pistons for compression weren't invented until 1838. Neither have the machine tools to make such finely tuned internal parts. Topping this all off, there does not exist a standard set of measurements which you could use to have craftsmen build parts of standardized sizes.
You need a spark plug. Which means you need to develop the technologies for integrating ceramic and metal into what is basically a capacitor. Also, you need a battery or at least an alternator to run the spark plug. Alternately, you can use compression ignition, but that just makes your metals problems in bullet point 1 that much worse.
You basically need...like....an Industrial Revolution to build an internal combustion engine. So, you can do it in the 14th century, as long as you have a ~1900 industrial base....but then you aren't really in the 14th century any more.
Yes... and No
Could you import enough educated people via time travel into the 14th century to build an inline engine? Of course. The metal existed then. The oil and rubber existed then. In other words, there's nothing about the planet, itself, in the 14th century that wasn't also true in the 19th and 20th centuries. So, yes, if you bring enough expertise with you, you can do it.
But what would be the point?
Technology (aka, knowledge) is a pyramid of knowledge and experience, innovation and insight, and at every moment the pinnacle of that pyramid is based on the accumulation of everything beneath it. The amount of knowledge and experience that pinnacle represents is staggering.
The smaller the group of people you can import into the 14th century, the more likely the answer is "no." The dependencies involved with technology are deep and unforgiving. Henry Ford (et al) had access to trains, "modern" mining, factories and cities full of people who were competent to work in those factories, universities (the educational pyramid alone is massive), chemical plants, tool manufacturers, etc., etc....
So, unless you can import each and every person you need (potentially thousands), no, you can't build an inline motor in the 14th century.
Besides, if if you import everyone you need, you wouldn't have the medieval period anymore. It would instantly (within 5 years) be changed to the industrial age. If history has proven anything, it's that keeping knowledge a secret is basically impossible.
P.S., if what you're trying to do is reinvent Twain's A Connecticut Yankee in King Aurther's Court, you should be aware that as you add detail, the story will become less believable. The story is only plausible when you force the tech to exist within the context of the culture, which means you can't have your engine and a believable story. I could be wrong guessing about your motivations, though.
Edit: A response to a comment made by @Graham brought this succinct point: Assuming you have no limitations to your time travel, you can always import enough people in the right order to guarantee construction of the engine — but that makes the timeline and the culture associated with the timeline irrelevant. The more relevant the timeline, the less possible that engine becomes (likely at an exponentially decreasing rate).
I think a hot-bulb two-stroke engine might just be possible. It has no valves, so no need for springs. Instead, it uses the reciprocation of the piston, quote Wikipedia "by the piston covering and uncovering ports in the cylinder wall". Since you still need somewhat high precision, you probably need to produce a working mechanical workshop. Set up shop by a river where you can use flowing water to power your lathe, which you will build from scratch and use to build a better lathe, which you will use to produce your engine.
Since you do not have access to much steel, if any, you need to work with cast iron. So this engine will be heavy and not suitable for airplanes, but for carriages, boats or a (possibly portable) power plant it would be fine.
Since hot-bulb engines run on crude oil, you don't need a petrochemical industry. Hot-bulb engines were usually started with lighter oils or gasoline/petrol, but you could likely distill smaller amounts of "starter fluid" from crude oil or maybe use ethanol. Or just heat the bulb with an external fire until the bulb is hot enough. Once the engine is hot, you can pour in olive oil, bees wax, crude oil, whatever flows and burns, tar oil. These engines are not picky, if it flows and burns it will run on it.
A hot-bulb engine also avoids spark plugs while avoiding the high compression ratio of the Diesel engine, avoiding the need for the high tolerance necessary for Diesel engines.
Regarding measuring, just produce your own reference measuring bits. They don't have to conform to anything in particular, the important thing is that they are internally consistent and that you store your reference bits safely, and only work with copies made from those. Choose metric, imperial, or invent your own system. :)
Since using bolts is another technology which is actually very advanced, use riveting whenever at all possible.
Edit: In fact, you may want to bootstrap your engine factory by first producing engines for stationary power plants, so you can build more robust, lower precision engines first. Now, mills and pumps for wells etc can be powered by your invention where there was no power source before.
These engines also run on wood gas, and wood you should be able to find without a petrochemical industry. :-)
Valveless pulsejet is definitely fit for aircraft and you could call it internal combustion one(fuel combusts inside after all).
You do not need high quality metal - ordinary construction steel was used for those and I am pretty sure bronze would work too.
Any plant oil would go as fuel - it was even fed coal dust!
Basically no precision is required - enthusiast just cut steel by hand when make one.
No need for spark plug - fire from previous cycle ignites fuel.
No need for fuel pump - you can use valve to pressurize fuel tank with exhaust from engine.
They could if you teach them how to make materials and all needed tools and parts of said engines and vehicles. And have funds and influence to get it going.
But that would take years to get there.
Tools that do not need energy??? Maybe they have internal power supply? Tools that use your muscles for energy source?