You seem to have asked multiple questions, and the answers to them are not all the same. So let's start with the physically observable ones, that we could in principle test to see what happens, before getting into any philosphical arguments about the "centrifugal force" and whether it really exists or not.
Will an object which you place inside the 'pipe' of the [vacuum-filled] torus […] be attracted to the edge of the torus?
No, it would not. With no contact between the object and the torus, they do not interact in any way,* and in particular, the torus cannot exert any force on the object. Thus, the object will behave in the same way (i.e. floating in place) regardless of whether the torus is actually there or not (and also whether, if present, it is spinning or not).
*) I'm neglecting any gravitational and long-range electromagnetic interactions between the object and the torus here, as well as even more subtle effects like relativistic frame dragging. In principle, those could all transmit forces between the torus and the object, but in practice, assuming that neither the object nor the torus carry any significant electric charges or magnetization, those effects should be negligible.
Or would it only experience the force if it was originally touching one of the walls?
If the object was touching the walls of the torus, then contact interactions (i.e. friction, or, if you want to get ultra-reductionist, short range electromagnetic interactions) can transmit a force from the torus to the object, giving it a net relative velocity tangential to the wall.
As the outer wall of the torus is curved, whereas the inertial trajectory of the object is not, this will push the object against the wall — which, being solid, will push back, and will also exert further frictional force on the object as long as its velocity differs from that of the rotating wall.
Eventually the two will reach an equilibrium where the tangential velocity of the object equals the rotational velocity of the wall, so that there is no lateral movement between them, and so no friction forces. 343
The only force exerted by the wall on the object at that point is the normal force that keeps the object from passing through the wall, and instead pushes the object towards the axis of the torus's rotation with just enough force to keep its trajectory circular. From the viewpoint of someone rotating along with the torus, the object has simply come to rest against the outer wall.
(While writing this, it occurred to me that it should be totally possible to do this in Kerbal Space Program, and indeed, it turns out that someone already (kind of) has. Alas, the video doesn't really demonstrate it as clearly as it could, but if you look around 1:30, you can see the rover floating inside the spinning ring until the player fires some thrusters to bring it into better contact with the ring. Also, around 5:25 the rover briefly takes off by driving against the rotation of the ring (and hitting a slight bump).)
And would the results be different if the torus was filled with a gas (air)?
Yes, because, even if the air wasn't initially rotating, aerodynamic drag forces along the walls of the torus would eventually cause the air to start rotating together with the torus. Those same drag forces would also then cause the object to move along with the air, which would eventually bring it in contact with the outer wall of the torus.
(For more details, you may also want to take a look at this thread on Science Fiction Stack Exchange, which concerns the physics of a helicopter flying inside a rotating air-filled space station.)
And if the inside of the torus was divided into sections (like the ship)?
If interior of the torus was in vacuum, but had radial walls dividing it into sections, then there would initially be no force exerted on the floating object. However, since the object is stationary but the section walls are rotating with the torus, one of them would eventually hit the object, imparting some non-zero tangential velocity to it. Again, this velocity would eventually bring it into contact with the outer wall.
OK, with the practical questions out of the way, let's get to the philosophical part:
Will an object which you place inside the 'pipe' of the torus experience the centrifugal force due to rotation?
Well, first of all, let's keep in mind that the centrifugal force is a "fictitious force" that only appears in rotating coordinate systems.
What does that mean? It means that, if we're looking at (for example) a rotating torus from the outside, but not rotating ourselves, then there is no such thing as a centrifugal force: there's only inertia (i.e. 621