Medieval tech wasn't that precise, although it was often ornate. The precision of manufacture would make any pieces stand out. And looking through the scope would be a dead give away. (I think scopes came in at the start of the renaissance. Early ones were murky, and inverted the image.)
Anyway -- If you have control of the manufacture of the weapon,you may be able to apply chemical pitting to the exterior surfaces.
Putting it in a container that guards normally wouldn't have access to would be the way to go. Is there a regular coach between towns that carries gold, precious items? Is there the equivalent of a diplomatic pouch?
Is booze shipped in barrels? A barrel of brandy would do to carry a suitably protected rifle. More to the point, few guards want to unload a wagon full of barrels of beer. Although they may insist on sampling one.
Is there a cathedral or other large public building under way? MANY wagons of stones would be coming in. Getting a 1 load contract to bring in a load of stone may be possible.
Edit in response to wagons as bandit magnets:
If you look at the accounts of the the use of the Silk Road, merchants would band together and form caravans, either under someone who made their living running caravans, or a large merchant with multiple wagons/pack animals would accept people who would travel with them but had only 1 wagon or only a few pack animals.
Similar organization in the American wagon settlement trains.
Multiple wagons weren't just for discouraging attacks. Roads were non-existent to primative. Being able to put 3 teams of horses/oxen on a single wagon to get it out of a mud hole was essential.
The nature of travel has always been one of compromise. The Ferrari excels on the Autobahn. It has trouble with potholes on gravel roads. A 4x4 pickup with mudder tires can go into amazing places, but you can watch the gas gauge move. Snowshoes are slower than skiis, but are more effective in rough bushy terrain.
Weaponry is also circumstantially dependent. A swiss pike is effective against calvary on an open plain. It's a lousy jungle weapon.
In Lord of the Rings, Tolkien has a pack animal go with the 4 hobbits, in addition to what they had on their backs. The western typically has the hero with a blanket roll (1 or 2 blankets rolled up in an oilcloth that may also be his 'duster' coat.) and a small bag with makings for coffee and a slab of hard cure bacon.
Reality: When I travel in the back country, my basic gear that I'm not wearing is about 20 to 25 pounds. I have to be ready for multiple climates. I need extras of some things. (socks) I need shelter -- even a tarp is a pound or two. It takes 2 pounds dry weight of food per person per day. Those numbers go back to Roman times, when the legion conquered the world on coarse ground wheat and barley.
So: To travel for a month requires an 80 pound pack. 20 pounds of gear. 60 pounds of food. Yes, if you are overweight you can go further before you run out.
If you live off the land, then you don't travel nearly as fast. Hunting is time consuming. See the journals of Warburton Pike, James Tyrell, and Vihljalmur Steffanson for examples. Pike traveled with a group of 8. They set camp at noon. 4 broke trail for the nextday (winter travel) 2 made camp. 2 hunted. The trailbreakers hunted opportunistically. Tyrell traveled by canoe. An 18 foot canoe can carry a thousand pounds. Common practice was to set a gill net off shore overnight, harvest fish in the morning. If there was a big surplus, they would stop for a day or two to dry it. Steffanson often traveled alone and used a rifle.
The truly independent hero, while a staple of fiction, especially the American west, was uncommon. One of the reasons as people we band together: A group of 10 people can do a lot more than 10 individuals can.
A marksman/sniper is a specialist. He doesn't operate in a vacuum. Who is he taking service with in the city? Wouldn't it make the most sense to cache his weapons outside the city, go make contact/contract, and get THAT person to arrange the passage through the city walls.
Second thing: A rifle, particularly when you want to shoot accurately at distances, is heavy. 8 pounds or so. Ammunition is also non-trivial. How many rounds does he bring with him?
Make a timeline of his journey. Make a list of everything he is carrying. How far can he travel without resupply? Where does he get resupply? What does his pack weigh? What is he buying food with? This whole notion is "Logistics" (A common aphorism: Captains worry about tactics. Colonels worry about strategy. Generals worry about logistics. Just how do we get those 5 ton 16 pounder cannons and their powder and their ball to where we can use them against the walls of the enemy fort?
This level of attention to detail can make or break a story. Fantasy with the rivets showing.